Skip to content

Instantly share code, notes, and snippets.

@seralf
Forked from coderofsalvation/savihost
Created December 27, 2013 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seralf/8150460 to your computer and use it in GitHub Desktop.
Save seralf/8150460 to your computer and use it in GitHub Desktop.
#!/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