Added update script to keep Swamp up to date.
This commit is contained in:
parent
dd69bad03a
commit
7e001a0208
34
swamp-update.sh
Executable file
34
swamp-update.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
updateURL="https://www.kaldobsky.com/audiogames/SwampPatch.zip"
|
||||
|
||||
extract_error() {
|
||||
echo "There was an error extracting the patch."
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# Set the swamp directory
|
||||
pushd ~/.local/wine/swamp
|
||||
|
||||
# Restore the directory stack on exit.
|
||||
trap popd EXIT
|
||||
|
||||
echo "Checking for Swamp updates..."
|
||||
|
||||
# Check for and download new patches.
|
||||
update="$(wget -N "${updateURL}" 2>&1 | grep "not modified on server")"
|
||||
|
||||
if [ -n "${update}" ]; then
|
||||
echo "Swamp is up to date."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Updating Swamp..."
|
||||
|
||||
# Unzip the new patch
|
||||
unzip -o SwampPatch.zip || extract_error
|
||||
|
||||
echo "Swamp has been updated."
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user