set -e will already exit if anything returns a non-zero exit code.
This commit is contained in:
z0z0z 2019-04-15 18:17:32 +00:00 committed by GitHub
parent 4f51362d0e
commit b105797b26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 7 deletions

View File

@ -1,15 +1,11 @@
#!/bin/bash #!/bin/sh
[[ -z $WINEPREFIX ]] && echo "WINEPREFIX not set" && exit 1 [ -z "$WINEPREFIX" ] && echo "WINEPREFIX not set" && exit 1
set -e set -e
overrideDll() { overrideDll() {
wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f >/dev/null 2>&1 wine reg add "HKEY_CURRENT_USER\Software\Wine\DllOverrides" /v $1 /d native /f
if [ $? -ne 0 ]; then
echo -e "Failed to add override for $1"
exit 1
fi
} }
scriptdir=$(dirname "$0") scriptdir=$(dirname "$0")