Removed old useless files

added gitignore
This commit is contained in:
wasabi
2025-05-29 18:10:56 -05:00
parent d7541cc843
commit ad79e5cd98
7 changed files with 20 additions and 237 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*.tar.gz
*.tgz

View File

@@ -1,90 +0,0 @@
#!/usr/bin/env bash
list_tools () {
echo "Available tools in this version:"
echo "sim Steamtricks Install Manager"
}
test_enable () {
steamtricks_enable () {
if [ "$#" -ne 1 ]; then
echo "Usage:"
echo "steamtricks_enable <tool>"
list_tools
exit 1
fi
source "${STEAMTRICKS_PREFIX}/steamtricks.conf"
case "${1}" in
sim | SIM)
}
local sed_steam_prefix () {
export SHELLPROFILE="${1}"
while true; do
read -r -p "What would you like your STEAMPREFIX to be?: " ANS1
read -r -p "is ${ANS1} correct?" ANS2
case "${ANS2}" in
[yY]* ) echo "s|STEAMPREFIX=.?|STEAMPREFIX=\"${ANS1}\"|g" >>"/tmp/steamprefix.sed"; sed -i -f "/tmp/steamprefix.sed" "${SHELLPROFILE}"; break
;;
*)
;;
esac
done
}
edit_steam_prefix () {
export SHELLPROFILE="${1}"
echo "Your prefix is currently set to: ${STEAMPREFIX}"
echo "If this is not where you install your games,"
echo "you will need to set it to the path where your"
echo "steamapps/common folder exists."
echo ""
echo "Some common defaults: "
echo "1: /var/games/SteamLibrary/steamapps/common - Default"
echo "2. ~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common - flatpak default"
echo "3. ~/.steam/steam/steamapps/common - system package default"
echo "4. ~/.local/share/steam/steamapps/common - old system package default"
echo "5. I have changed it, enter a custom path"
while true; do
read -r -p "Choice [1-5]: " ANS
case "$ANS" in
1) sed -i 's|STEAMPREFIX=.?$|STEAMPREFIX="/var|games/SteamLibrary/steamapps/common"|g' "${SHELLPROFILE}"; break
;;
2) sed -i 's|STEAMPREFIX=.?$|STEAMPREFIX="~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common"|g' "${SHELLPROFILE}"; break
;;
3) sed -i 's|STEAMPREFIX=.?$|STEAMPREFIX="~/.steam/steam/steamapps/common"|g' "${SHELLPROFILE}"; break
;;
4) sed -i 's|STEAMPREFIX=.?$|STEAMPREFIX="~/.local/share/steam/steamapps/common"|g' "${SHELLPROFILE}"; break
;;
5) sed_steam_prefix; break
;;
*) echo "Please select an option between 1 and 5"
;;
esac
done
}
steam_prefix_config () {
export SHELLPROFILE="~/.${1}rc"
source "~/.${1}rc"
echo "The current STEAMPREFIX variable is set to ${STEAMPREFIX}"
echo -n "Do you wish to change this? [y/N]: "
read ANS
case "$ANS" in
y* | Y* ) sed_prefix "${SHELLPROFILE}"
;;
* ) echo "Installation complete"
;;
esac
}

View File

@@ -1,66 +0,0 @@
#!/usr/bin/env bash
sed_steam_prefix () {
export SHELLPROFILE="${1}"
while true; do
read -r -p "What would you like your STEAMPREFIX to be?: " ANS1
read -r -p "is ${ANS1} correct?" ANS2
case "${ANS2}" in
[yY]* ) echo "s|STEAMPREFIX=.?|STEAMPREFIX=\"${ANS1}\"|g" >>"/tmp/steamprefix.sed"; sed -i -f "/tmp/steamprefix.sed" "${SHELLPROFILE}"; break
;;
*)
;;
esac
done
}
edit_steam_prefix () {
export SHELLPROFILE="${1}"
echo "Your prefix is currently set to: ${STEAMPREFIX}"
echo "If this is not where you install your games,"
echo "you will need to set it to the path where your"
echo "steamapps/common folder exists."
echo ""
echo "Some common defaults: "
echo "1: /var/games/SteamLibrary/steamapps/common - Default"
echo "2. ~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common - flatpak default"
echo "3. ~/.steam/steam/steamapps/common - system package default"
echo "4. ~/.local/share/steam/steamapps/common - old system package default"
echo "5. I have changed it, enter a custom path"
while true; do
read -r -p "Choice [1-5]: " ANS
case "$ANS" in
1) sed -i 's|STEAMPREFIX=.?$|STEAMPREFIX="/var|games/SteamLibrary/steamapps/common"|g' "${SHELLPROFILE}"; break
;;
2) sed -i 's|STEAMPREFIX=.?$|STEAMPREFIX="~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common"|g' "${SHELLPROFILE}"; break
;;
3) sed -i 's|STEAMPREFIX=.?$|STEAMPREFIX="~/.steam/steam/steamapps/common"|g' "${SHELLPROFILE}"; break
;;
4) sed -i 's|STEAMPREFIX=.?$|STEAMPREFIX="~/.local/share/steam/steamapps/common"|g' "${SHELLPROFILE}"; break
;;
5) sed_steam_prefix; break
;;
*) echo "Please select an option between 1 and 5"
;;
esac
done
}
steam_prefix_config () {
export SHELLPROFILE="~/.${1}rc"
source "~/.${1}rc"
echo "The current STEAMPREFIX variable is set to ${STEAMPREFIX}"
echo -n "Do you wish to change this? [y/N]: "
read ANS
case "$ANS" in
y* | Y* ) sed_prefix "${SHELLPROFILE}"
;;
* ) echo "Installation complete"
;;
esac
}

View File

@@ -1,78 +0,0 @@
#!/usr/bin/env bash
# STEAMPREFIX is simply the path to where your steam games are installed. My library is in /var/games, but you may change it to your liking
# This function will change symbolic links from your steamapps/common folder to the install location of whichever game you wish. I use this
# for managing stable and beta versions of Project Zomboid, but you can use them for any game
change_install () {
if [ "$#" -lt 2 ]; then
echo "Usage: change_install <GameFolder> <InstallLocation>"
echo "Where GameFolder is the location of your game files"
echo "and InstallLocation is where you'd like to link them."
echo "GameFolder should be a renamed game folder in your steamapps/common folder"
exit 1
fi
export GAMEFOLDER=${1}
export INSTALLLOCATION=${2}
echo "Please exit Steam now to prevent updating over a different version"
echo "It's also recommended to add ${INSTALLLOCATION} to your exceptions"
echo "in Steam to only update the game when you launch it"
echo "(Enter to continue, CTRL+C to exit)"
read
unlink "${STEAMPREFIX}/${INSTALLLOCATION}"
if [ "$?" -ne 0 ]; then
echo "Unlink failed, have you followed the setup process?"
exit 1
fi
ln -s "${STEAMPREFIX}/${GAMEFOLDER}" "${STEAMPREFIX}/${INSTALLLOCATION}"
echo "You may start Steam now. Please remember to change your beta settings for ${GAMEFOLDER}"
echo "to prevent from updating to a version you do not want in this location"
}
setup_install () {
if [ "$#" -lt 2 ]; then
export SHELLNAME=$(echo $SHELL | awk -F "/" '{print $NF}')
echo "Usage: setup_install <GameFolder> <NewLocation>"
echo "Where GameFolder is the install location in your steam prefix"
echo "Please make sure to update your Steam Prefix to your library location"
echo "if you are not using ${STEAMPREFIX} as your library location"
echo "This variable can be found in your profile, also known as .${SHELLNAME}rc"
exit 1
fi
export GAMEFOLDER=${1}
export NEWLOCATION=${2}
echo "Please quit Steam at this time"
echo "(Enter to continue, CTRL+C to exit)"
read
echo "Moving ${STEAMPREFIX}/${GAMEFOLDER} to ${STEAMPREFIX}/${NEWLOCATION}"
echo -n "Continue? [y/N]: "
read ANS
case "${ANS}" in
y* | Y*) mv "${STEAMPREFIX}/${GAMEFOLDER}" "${STEAMPREFIX}/${NEWLOCATION}"
;;
*) echo "Cancelling with no change"; exit 1
;;
esac
if [ "$?" -eq 0 ]; then
echo "Game moved successfully!"
echo "You may now start Steam and install a different version of the game."
echo "To make the game playable, please run:"
echo "change_install ${NEWLOCATION} ${GAMEFOLDER}"
else
echo "Game could not be moved. Please check your command and try again."
echo "Remember that file paths are case-sensitive on Linux"
exit 1
fi
}

View File

@@ -1,3 +0,0 @@
ENABLE_STEAMTRICKS_CONFIG=1
ENABLE_STEAMTRICKS_INSTALL_MANAGER=1
ENABLE_STEAMTRICKS_SETUP=1

View File

@@ -18,6 +18,7 @@ use constant {
my $steamtricks_prefix = $ENV{'STEAMTRICKS_PREFIX'};
my $change_install = '';
my $create_install = '';
my $new_config = '';
my $game = '';
my $game_version = '';
@@ -27,7 +28,9 @@ my $version = '';
my $config_location = "${steamtricks_prefix}/steamtricks.conf"
GetOptions ('steam-prefix=s' => \$steam_prefix,
'create-install' => \$create_install,
'change-install' => \$change_install,
'game=s' => \$game,
'setup-config' => \$new_config,
'steam-prefix=s' => \$new_steam_prefix,
'game-version=s' => \$game_version,
@@ -45,6 +48,10 @@ sub main {
print basename($0), VERSION;
} else if ($new_config) {
setup_config($new_steam_prefix)
} else if ($change_install && $game_version) {
} else if ($create_install && $game_version) {
}
}

View File

@@ -0,0 +1,11 @@
# For the time being, this config file is very picky. You cannot leave trailing
# slashes on any paths in this folder
STEAM_PREFIX=~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common
# You may add any number of managed games you'd like, just note that the value
# is case sensitive and should match the original folder name in steamapps/common
# you must also have a separate MANAGED_GAME[] entry for each game
# the brackets are necessary
MANAGED_GAME[]=ProjectZomboid
MANAGED_GAME[]=ELDEN RING
MANAGED_GAME[]=Baldurs Gate 3