Use beautysh to format the code.

This commit is contained in:
Storm Dragon 2022-03-11 12:43:22 -05:00
parent 94324c9290
commit 1d5a01d79c

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
license() { license() {
cat << EOF cat << EOF
■The contents of this file are subject to the Common Public Attribution ■The contents of this file are subject to the Common Public Attribution
License Version 1.0 (the ■License■); you may not use this file except in License Version 1.0 (the ■License■); you may not use this file except in
compliance with the License. You may obtain a copy of the License at compliance with the License. You may obtain a copy of the License at
@ -78,9 +78,9 @@ update() {
local downloadFile="audiogame-manager.mac" local downloadFile="audiogame-manager.mac"
else else
if [[ "$(uname -m)" == "armv7l" ]]; then if [[ "$(uname -m)" == "armv7l" ]]; then
local downloadFile="audiogame-manager.arm" local downloadFile="audiogame-manager.arm"
else else
local downloadFile="audiogame-manager" local downloadFile="audiogame-manager"
fi fi
fi fi
if [[ "$(wget --quiet -O - https://stormgames.wolfe.casa/downloads/${downloadFile} | sha256sum | cut -d ' ' -f1)" == "$(sha256sum "${filePath}" | cut -d ' ' -f1)" ]]; then if [[ "$(wget --quiet -O - https://stormgames.wolfe.casa/downloads/${downloadFile} | sha256sum | cut -d ' ' -f1)" == "$(sha256sum "${filePath}" | cut -d ' ' -f1)" ]]; then
@ -106,7 +106,7 @@ open_url() {
open "${*}" 2> /dev/null open "${*}" 2> /dev/null
else else
xdg-open "${*}" 2> /dev/null xdg-open "${*}" 2> /dev/null
fi fi
} }
# Create desktop launcher file # Create desktop launcher file
@ -135,7 +135,7 @@ desktop_launcher() {
'StartupNotify=false' 'StartupNotify=false'
'Keywords=game;' 'Keywords=game;'
'Categories=Game;' 'Categories=Game;'
'Version=1.0') 'Version=1.0')
for i in "${dotDesktop[@]}" ; do for i in "${dotDesktop[@]}" ; do
echo "$i" >> "${desktopFile}" echo "$i" >> "${desktopFile}"
done done
@ -147,18 +147,18 @@ desktop_launcher() {
# Create the clipboard reading function for Sequence Storm # Create the clipboard reading function for Sequence Storm
write_sequence_storm_reader() { write_sequence_storm_reader() {
if -e ~/.SequenceStormReader ]]; then if -e ~/.SequenceStormReader ]]; then
return return
fi fi
# Here-document start # Here-document start
cat << "EOF" > ~/.SequenceStormReader cat << "EOF" > ~/.SequenceStormReader
#!/usr/bin/env bash #!/usr/bin/env bash
# Wait for the game to be launched # Wait for the game to be launched
while ! pgrep -u "$USER" ^SequenceStorm &> /dev/null ; do while ! pgrep -u "$USER" ^SequenceStorm &> /dev/null ; do
sleep 0.05 sleep 0.05
done done
export DISPLAY=:0 export DISPLAY=:0
unset cliptext unset cliptext
socketFile="$(find /tmp -maxdepth 1 -name "orca-*.sock")" socketFile="$(find /tmp -maxdepth 1 -name "orca-*.sock")"
@ -195,7 +195,7 @@ while pgrep -u "$USER" ^SequenceStorm &> /dev/null ; do
fi fi
sleep 0.05 sleep 0.05
done done
exit 0 exit 0
EOF EOF
# Here-document end # Here-document end
@ -351,7 +351,7 @@ download() {
get_bottle() { get_bottle() {
# Handles games that use the same wine bottle # Handles games that use the same wine bottle
case "${game}" in case "${game}" in
# Aprone (Jeremy Kaldobsky) games. # Aprone (Jeremy Kaldobsky) games.
"castaways"*) ;& "castaways"*) ;&
"castaways-2"*) ;& "castaways-2"*) ;&
@ -502,7 +502,7 @@ echo "Loading documentation, please wait..."
fi fi
exit 0 exit 0
} }
winetricks() { winetricks() {
# Report used packages to the winetricks maintainer so he knows they are being used. # Report used packages to the winetricks maintainer so he knows they are being used.
if ! [[ -e "${XDG_CACHE_HOME:-$HOME/.cache}/winetricks/track_usage" ]]; then if ! [[ -e "${XDG_CACHE_HOME:-$HOME/.cache}/winetricks/track_usage" ]]; then
@ -1921,7 +1921,7 @@ case "${game}" in
wine "${cache}/judgmentdayfullsetup.exe" /silent wine "${cache}/judgmentdayfullsetup.exe" /silent
cat << EOF > /tmp/judgementday.reg cat << EOF > /tmp/judgementday.reg
Windows Registry Editor Version 5.00 Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\VB and VBA Program Settings\judgmentday\config] [HKEY_CURRENT_USER\Software\VB and VBA Program Settings\judgmentday\config]
"name"="$USER" "name"="$USER"
EOF EOF
@ -2310,7 +2310,7 @@ EOF
;; ;;
"Super Egg Hunt") "Super Egg Hunt")
export bottle="l-works" export bottle="l-works"
install_wine_bottle install_wine_bottle
download "http://files.l-works.net/superegghuntsetup.exe" download "http://files.l-works.net/superegghuntsetup.exe"
wine "${cache}/superegghuntsetup.exe" /silent wine "${cache}/superegghuntsetup.exe" /silent
add_launcher "c:\Program Files\Lworks\super egg hunt\superegghunt.exe" add_launcher "c:\Program Files\Lworks\super egg hunt\superegghunt.exe"