Update allpac/install.sh
Signed-off-by: Connor C <ceo@pixelridgesoftworks.com>
This commit is contained in:
parent
3d059e500f
commit
865478e64b
|
@ -9,12 +9,12 @@ read -p "Proceed? [Y/n] " -n 1 -r
|
||||||
echo
|
echo
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
echo "Writing new pkg.list..."
|
echo "Writing new pkg.list..."
|
||||||
sleep 1
|
sleep 2
|
||||||
touch ~/.allpac/pkg.list
|
touch ~/.allpac/pkg.list
|
||||||
echo "{}" > ~/.allpac/pkg.list
|
echo "{}" > ~/.allpac/pkg.list
|
||||||
else
|
else
|
||||||
echo "Skipping writing new pkg.list..."
|
echo "Skipping writing new pkg.list..."
|
||||||
sleep 1
|
sleep 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
go_version=$(go version 2>/dev/null)
|
go_version=$(go version 2>/dev/null)
|
||||||
|
@ -32,17 +32,21 @@ if [[ "$go_version" != *"$required_version"* ]]; then
|
||||||
echo " "
|
echo " "
|
||||||
echo "So, because the Arch Developers won't make Pacman alert you of this, I guess AllPac has to..."
|
echo "So, because the Arch Developers won't make Pacman alert you of this, I guess AllPac has to..."
|
||||||
echo " "
|
echo " "
|
||||||
sleep 1
|
sleep 2
|
||||||
echo "Running 'pacman -Sy'/'pacman -S' syncs the package database, but doesn't update all the packages on the system"
|
echo "Running 'pacman -Sy' syncs the package database, but doesn't update all the packages on the system"
|
||||||
echo "This can cause a lot of problems if something gets updated but something that depends on it doesn't."
|
echo "This can cause a lot of problems if something gets updated but something that depends on it doesn't."
|
||||||
echo " "
|
echo " "
|
||||||
echo "It's called a 'Partial Upgrade' and it can break your system"
|
echo "It's called a 'Partial Upgrade' and it can break your system"
|
||||||
echo "If you wanna install a package and you don't use AllPac, always just run 'pacman -Syu {package}'"
|
echo "If you wanna install a package and you don't use AllPac, always just run 'pacman -Syu {package}'"
|
||||||
echo " "
|
echo " "
|
||||||
sleep 1
|
sleep 2
|
||||||
|
echo "On the other hand;"
|
||||||
|
echo "Running 'pacman -S' will install a package, but not update the package database. So you might not get the newest version. Which can be it's own issue."
|
||||||
|
echo " "
|
||||||
|
sleep 2
|
||||||
echo "That's all it took to explain the issue properly Scimmia..."
|
echo "That's all it took to explain the issue properly Scimmia..."
|
||||||
echo "Arch Linux Forums users/devs are toxic."
|
echo "Arch Linux Forums users/devs are toxic."
|
||||||
sleep 3
|
sleep 4
|
||||||
sudo pacman -Syu go
|
sudo pacman -Syu go
|
||||||
else
|
else
|
||||||
echo "Go not installed. Exiting."
|
echo "Go not installed. Exiting."
|
||||||
|
@ -50,7 +54,7 @@ if [[ "$go_version" != *"$required_version"* ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 2
|
||||||
|
|
||||||
echo "Compatible Go version is installed!"
|
echo "Compatible Go version is installed!"
|
||||||
echo "Checking if Git is installed..."
|
echo "Checking if Git is installed..."
|
||||||
|
@ -68,26 +72,26 @@ if ! command -v git &>/dev/null; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 2
|
||||||
|
|
||||||
echo "Git is installed!"
|
echo "Git is installed!"
|
||||||
|
|
||||||
echo "Cloning AllPac Repository from Git..."
|
echo "Cloning AllPac Repository from Git..."
|
||||||
sleep 1
|
sleep 2
|
||||||
|
|
||||||
git clone https://git.pixelridgesoftworks.com/PixelRidge-Softworks/AllPac.git || { echo "Failed to clone repository. Exiting."; exit 1; }
|
git clone https://git.pixelridgesoftworks.com/PixelRidge-Softworks/AllPac.git || { echo "Failed to clone repository. Exiting."; exit 1; }
|
||||||
|
|
||||||
echo "Descending into cloned repo..."
|
echo "Descending into cloned repo..."
|
||||||
sleep 1
|
sleep 2
|
||||||
cd AllPac/cmd/ || { echo "Failed to change directory. Exiting."; exit 1; }
|
cd AllPac/cmd/ || { echo "Failed to change directory. Exiting."; exit 1; }
|
||||||
|
|
||||||
echo "Ensuring we have up to date dependencies..."
|
echo "Ensuring we have up to date dependencies..."
|
||||||
go mod tidy || { echo "Failed to tidy dependencies. Exiting."; exit 1; }
|
go mod tidy || { echo "Failed to tidy dependencies. Exiting."; exit 1; }
|
||||||
sleep 1
|
sleep 2
|
||||||
|
|
||||||
echo "Building binary..."
|
echo "Building binary..."
|
||||||
go build -o ~/.allpac/bin/allpac || { echo "Failed to build binary. Exiting."; exit 1; }
|
go build -o ~/.allpac/bin/allpac || { echo "Failed to build binary. Exiting."; exit 1; }
|
||||||
sleep 1
|
sleep 2
|
||||||
|
|
||||||
echo "Binary built!"
|
echo "Binary built!"
|
||||||
|
|
||||||
|
@ -106,7 +110,7 @@ case $SHELL in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "Adding AllPac to the system path..."
|
echo "Adding AllPac to the system path..."
|
||||||
sleep 1
|
sleep 2
|
||||||
if ! grep -qF 'export PATH=$PATH:$HOME/.allpac/bin' "$shell_rc"; then
|
if ! grep -qF 'export PATH=$PATH:$HOME/.allpac/bin' "$shell_rc"; then
|
||||||
echo 'export PATH=$PATH:$HOME/.allpac/bin' >> "$shell_rc"
|
echo 'export PATH=$PATH:$HOME/.allpac/bin' >> "$shell_rc"
|
||||||
fi
|
fi
|
||||||
|
@ -114,11 +118,11 @@ fi
|
||||||
updater_url="https://git.pixelridgesoftworks.com/PixelRidge-Softworks/Installers/raw/branch/main/allpac/update.sh"
|
updater_url="https://git.pixelridgesoftworks.com/PixelRidge-Softworks/Installers/raw/branch/main/allpac/update.sh"
|
||||||
echo "Downloading updater script..."
|
echo "Downloading updater script..."
|
||||||
wget -O ~/.allpac/bin/allpac-updater.sh "$updater_url" || { echo "Failed to download updater script. Exiting."; exit 1; }
|
wget -O ~/.allpac/bin/allpac-updater.sh "$updater_url" || { echo "Failed to download updater script. Exiting."; exit 1; }
|
||||||
sleep 1
|
sleep 2
|
||||||
|
|
||||||
echo "Setting updater script permissions..."
|
echo "Setting updater script permissions..."
|
||||||
chmod u+rwx ~/.allpac/bin/allpac-updater.sh
|
chmod u+rwx ~/.allpac/bin/allpac-updater.sh
|
||||||
sleep 1
|
sleep 2
|
||||||
|
|
||||||
echo "Aliasing the updater script..."
|
echo "Aliasing the updater script..."
|
||||||
echo "alias allpac-update-system='~/.allpac/bin/allpac-updater.sh'" >> "$shell_rc"
|
echo "alias allpac-update-system='~/.allpac/bin/allpac-updater.sh'" >> "$shell_rc"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user