-
-
Save seralf/8150460 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
path="$(dirname "$(readlink -f "$0")" )" | |
checkexe(){ | |
if [[ ! -f "$path/savihost.exe" ]]; then | |
echo "[!] savihost.exe was not found in directory $path" | |
echo "[!] please go to http://www.hermannseib.com/english/savihost.htm and download it" | |
exit 1 | |
fi | |
} | |
copy(){ | |
[[ ! -f "$1" ]] && ( echo "$1 is not a valid vstfile" && exit 1); | |
savihostexe="$( echo "$1" | sed "s/dll/exe/g" )" | |
ln "$path/savihost.exe" "$savihostexe" | |
} | |
run(){ | |
savihostexe="$( echo "$1" | sed "s/dll/exe/g" )" | |
wine "$savihostexe" | |
rm "$savihostexe" | |
} | |
[[ ! -n "$1" ]] && echo "Usage: savihost <yourplugin.dll>" && exit 1 | |
checkexe && copy "$1" && run "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment