mirror of
https://github.com/darksaid98/yolks.git
synced 2026-12-04 14:39:01 +00:00
style: format shell scripts
This commit is contained in:
23 files changed
+355
-371
No files matched your search
+25
-25
@@ -22,14 +22,14 @@ else
|
||||
fi
|
||||
|
||||
## if auto_update is not set or to 1 update
|
||||
if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
|
||||
if [ -z ${AUTO_UPDATE} ] || [ "${AUTO_UPDATE}" == "1" ]; then
|
||||
# Update Source Server
|
||||
if [ ! -z ${SRCDS_APPID} ]; then
|
||||
if [ "${STEAM_USER}" == "anonymous" ]; then
|
||||
./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
|
||||
else
|
||||
numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update 1007 +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) $( [[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}" ) $( [[ -z ${VALIDATE} ]] || printf %s "validate" ) +quit
|
||||
fi
|
||||
if [ "${STEAM_USER}" == "anonymous" ]; then
|
||||
./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $([[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows') +app_update 1007 +app_update ${SRCDS_APPID} $([[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}") $([[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}") $([[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}") $([[ -z ${VALIDATE} ]] || printf %s "validate") +quit
|
||||
else
|
||||
numactl --physcpubind=+0 ./steamcmd/steamcmd.sh +force_install_dir /home/container +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $([[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows') +app_update 1007 +app_update ${SRCDS_APPID} $([[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}") $([[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}") $([[ -z ${HLDS_GAME} ]] || printf %s "+app_set_config 90 mod ${HLDS_GAME}") $([[ -z ${VALIDATE} ]] || printf %s "validate") +quit
|
||||
fi
|
||||
else
|
||||
echo -e "No appid set. Starting Server"
|
||||
fi
|
||||
@@ -39,7 +39,7 @@ else
|
||||
fi
|
||||
|
||||
if [[ $XVFB == 1 ]]; then
|
||||
Xvfb :0 -screen 0 ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}x${DISPLAY_DEPTH} &
|
||||
Xvfb :0 -screen 0 ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}x${DISPLAY_DEPTH} &
|
||||
fi
|
||||
|
||||
# Install necessary to run packages
|
||||
@@ -49,37 +49,37 @@ mkdir -p $WINEPREFIX
|
||||
|
||||
# Check if wine-gecko required and install it if so
|
||||
if [[ $WINETRICKS_RUN =~ gecko ]]; then
|
||||
echo "Installing Gecko"
|
||||
WINETRICKS_RUN=${WINETRICKS_RUN/gecko}
|
||||
echo "Installing Gecko"
|
||||
WINETRICKS_RUN=${WINETRICKS_RUN/gecko/}
|
||||
|
||||
if [ ! -f "$WINEPREFIX/gecko_x86.msi" ]; then
|
||||
wget -q -O $WINEPREFIX/gecko_x86.msi http://dl.winehq.org/wine/wine-gecko/2.47.4/wine_gecko-2.47.4-x86.msi
|
||||
fi
|
||||
if [ ! -f "$WINEPREFIX/gecko_x86.msi" ]; then
|
||||
wget -q -O $WINEPREFIX/gecko_x86.msi http://dl.winehq.org/wine/wine-gecko/2.47.4/wine_gecko-2.47.4-x86.msi
|
||||
fi
|
||||
|
||||
if [ ! -f "$WINEPREFIX/gecko_x86_64.msi" ]; then
|
||||
wget -q -O $WINEPREFIX/gecko_x86_64.msi http://dl.winehq.org/wine/wine-gecko/2.47.4/wine_gecko-2.47.4-x86_64.msi
|
||||
fi
|
||||
if [ ! -f "$WINEPREFIX/gecko_x86_64.msi" ]; then
|
||||
wget -q -O $WINEPREFIX/gecko_x86_64.msi http://dl.winehq.org/wine/wine-gecko/2.47.4/wine_gecko-2.47.4-x86_64.msi
|
||||
fi
|
||||
|
||||
wine msiexec /i $WINEPREFIX/gecko_x86.msi /qn /quiet /norestart /log $WINEPREFIX/gecko_x86_install.log
|
||||
wine msiexec /i $WINEPREFIX/gecko_x86_64.msi /qn /quiet /norestart /log $WINEPREFIX/gecko_x86_64_install.log
|
||||
wine msiexec /i $WINEPREFIX/gecko_x86.msi /qn /quiet /norestart /log $WINEPREFIX/gecko_x86_install.log
|
||||
wine msiexec /i $WINEPREFIX/gecko_x86_64.msi /qn /quiet /norestart /log $WINEPREFIX/gecko_x86_64_install.log
|
||||
fi
|
||||
|
||||
# Check if wine-mono required and install it if so
|
||||
if [[ $WINETRICKS_RUN =~ mono ]]; then
|
||||
echo "Installing mono"
|
||||
WINETRICKS_RUN=${WINETRICKS_RUN/mono}
|
||||
echo "Installing mono"
|
||||
WINETRICKS_RUN=${WINETRICKS_RUN/mono/}
|
||||
|
||||
if [ ! -f "$WINEPREFIX/mono.msi" ]; then
|
||||
wget -q -O $WINEPREFIX/mono.msi https://dl.winehq.org/wine/wine-mono/9.1.0/wine-mono-9.1.0-x86.msi
|
||||
fi
|
||||
if [ ! -f "$WINEPREFIX/mono.msi" ]; then
|
||||
wget -q -O $WINEPREFIX/mono.msi https://dl.winehq.org/wine/wine-mono/9.1.0/wine-mono-9.1.0-x86.msi
|
||||
fi
|
||||
|
||||
wine msiexec /i $WINEPREFIX/mono.msi /qn /quiet /norestart /log $WINEPREFIX/mono_install.log
|
||||
wine msiexec /i $WINEPREFIX/mono.msi /qn /quiet /norestart /log $WINEPREFIX/mono_install.log
|
||||
fi
|
||||
|
||||
# List and install other packages
|
||||
for trick in $WINETRICKS_RUN; do
|
||||
echo "Installing $trick"
|
||||
winetricks -q $trick
|
||||
echo "Installing $trick"
|
||||
winetricks -q $trick
|
||||
done
|
||||
|
||||
# Replace Startup Variables
|
||||
|
||||
Reference in new issue
Block a user