From 6ed46a125007dcb8ba344bcf129cc2d7bc898c2b Mon Sep 17 00:00:00 2001 From: Ebenezer Nikabou Date: Sun, 17 Dec 2023 23:55:51 +0200 Subject: [PATCH] added debian based distros automatic install script --- install-scripts/install-script-deb.sh | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 install-scripts/install-script-deb.sh diff --git a/install-scripts/install-script-deb.sh b/install-scripts/install-script-deb.sh new file mode 100755 index 0000000..4769513 --- /dev/null +++ b/install-scripts/install-script-deb.sh @@ -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."