Updated install.sh and webinstall.sh to not add extraneous copies of path and STEAMTRICKS_PREFIX

This commit is contained in:
Elia Farin
2025-05-30 16:36:22 -05:00
parent 0b617c9e27
commit 5698e7108e
2 changed files with 20 additions and 8 deletions

View File

@@ -10,13 +10,19 @@ unsupported_shell () {
install () {
export SHELLPROFILE="$1"
mkdir $HOME/.steamtricks
cp -r steamtricks/* $HOME/.steamtricks
if [ -d "$HOME/.steamtricks" ]; then
else
mkdir $HOME/.steamtricks
fi
cp -r steamtricks/* $HOME/.steamtricks/
chmod 755 $HOME/.steamtricks/bin/steamtricks
echo "export STEAMTRICKS_PREFIX=\"$HOME/.steamtricks\"">>"${SHELLPROFILE}"
echo "export PATH=\"\$PATH:$HOME/.steamtricks/bin\"">>"${SHELLPROFILE}"
if [ -z "$STEAMTRICKS_PREFIX" ]; then
echo "export STEAMTRICKS_PREFIX=\"$HOME/.steamtricks\"">>"${SHELLPROFILE}"
fi
echo "Install completed! Please source your profile $SHELLPROFILE to load the changes!"
if [ -z "$(echo $PATH | grep 'steamtricks')" ]; then
echo "Install completed! Please source your profile $SHELLPROFILE to load the changes!"
fi
}
install_manager () {

View File

@@ -12,10 +12,16 @@ unsupported_shell () {
install () {
export SHELLPROFILE="$1"
curl "$DOWNLOADURL" | tar -xvC $HOME/
curl "$DOWNLOADURL" | tar -xvC $HOME/ || echo "Could not install steamtricks" && exit 1
chmod 755 $HOME/.steamtricks/bin/steamtricks
echo "export STEAMTRICKS_PREFIX=\"$HOME/.steamtricks\"">>"${SHELLPROFILE}"
echo "export PATH=\"\$PATH:$HOME/.steamtricks/bin\"">>"${SHELLPROFILE}"
if [ -z "$STEAMTRICKS_PREFIX" ]; then
echo "export STEAMTRICKS_PREFIX=\"$HOME/.steamtricks\"">>"${SHELLPROFILE}"
fi
if [ -z "$(echo $PATH | grep 'steamtricks')" ]; then
echo "Install completed! Please source your profile $SHELLPROFILE to load the changes!"
fi
echo "Install completed! Please source your profile $SHELLPROFILE to load the changes!"
}