Skip to content

Commit 6ed46a1

Browse files
committed
added debian based distros automatic install script
1 parent 6700fd2 commit 6ed46a1

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "Downloading binaries"
5+
6+
curl https://codeload.github.com/gist/8c298d51c599794ddcf5cdfc86012345/zip/6408d6c9c693ac30e0c4c0c19a4f42c0b869d84d --output gpt-shell-archive.zip
7+
8+
if ! which unzip > /dev/null; then
9+
echo "Installing unzip"
10+
sudo apt-get update
11+
sudo apt-get install unzip
12+
fi
13+
14+
unzip gpt-shell-archive.zip -d gpt-shell-archive
15+
16+
if [ ! -d "/usr/local/bin/gpts" ]; then
17+
sudo mkdir /usr/local/bin/gpts
18+
fi
19+
20+
sudo mv ./gpt-shell-archive/8c298d51c599794ddcf5cdfc86012345-6408d6c9c693ac30e0c4c0c19a4f42c0b869d84d/* /usr/local/bin/gpts
21+
sudo mv /usr/local/bin/gpts/script.js /usr/local/bin/gpts/gpts
22+
23+
sudo chmod +x /usr/local/bin/gpts/gpts
24+
25+
# Cleanup
26+
rm -rf ./gpt-shell-archive
27+
rm ./gpt-shell-archive.zip
28+
29+
# Add to path
30+
if ! grep -q "export PATH=\$PATH:/usr/local/bin/gpts" ~/.bashrc; then
31+
echo "export PATH=\$PATH:/usr/local/bin/gpts" >> ~/.bashrc
32+
fi
33+
34+
echo -e "\n🔥 All done.\n"
35+
36+
echo -e "💻 Restart your terminal or source your .bashrc to use gpts.\n"
37+
38+
echo "🚀 Installation complete."

0 commit comments

Comments
 (0)