File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 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."
You can’t perform that action at this time.
0 commit comments