-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from ebenjs/bundle
added debian based distros automatic install script
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "Downloading binaries" | ||
|
||
curl https://codeload.github.com/gist/8c298d51c599794ddcf5cdfc86012345/zip/6408d6c9c693ac30e0c4c0c19a4f42c0b869d84d --output gpt-shell-archive.zip | ||
|
||
if ! which unzip > /dev/null; then | ||
echo "Installing unzip" | ||
sudo apt-get update | ||
sudo apt-get install unzip | ||
fi | ||
|
||
unzip gpt-shell-archive.zip -d gpt-shell-archive | ||
|
||
if [ ! -d "/usr/local/bin/gpts" ]; then | ||
sudo mkdir /usr/local/bin/gpts | ||
fi | ||
|
||
sudo mv ./gpt-shell-archive/8c298d51c599794ddcf5cdfc86012345-6408d6c9c693ac30e0c4c0c19a4f42c0b869d84d/* /usr/local/bin/gpts | ||
sudo mv /usr/local/bin/gpts/script.js /usr/local/bin/gpts/gpts | ||
|
||
sudo chmod +x /usr/local/bin/gpts/gpts | ||
|
||
# Cleanup | ||
rm -rf ./gpt-shell-archive | ||
rm ./gpt-shell-archive.zip | ||
|
||
# Add to path | ||
if ! grep -q "export PATH=\$PATH:/usr/local/bin/gpts" ~/.bashrc; then | ||
echo "export PATH=\$PATH:/usr/local/bin/gpts" >> ~/.bashrc | ||
fi | ||
|
||
echo -e "\n🔥 All done.\n" | ||
|
||
echo -e "💻 Restart your terminal or source your .bashrc to use gpts.\n" | ||
|
||
echo "🚀 Installation complete." |