diff options
author | Mario Finelli | 2015-06-09 08:46:45 -0400 |
---|---|---|
committer | Mario Finelli | 2015-06-09 08:46:45 -0400 |
commit | 54d2bbfe24565c0af01ed8eff2da5e40e62b60c4 (patch) | |
tree | 9c65817a6c8ee6e3713531f4af4a7a8816d29382 /foobar2000.sh | |
download | aur-54d2bbfe24565c0af01ed8eff2da5e40e62b60c4.tar.gz |
Initial import
Diffstat (limited to 'foobar2000.sh')
-rw-r--r-- | foobar2000.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/foobar2000.sh b/foobar2000.sh new file mode 100644 index 000000000000..f26d04906752 --- /dev/null +++ b/foobar2000.sh @@ -0,0 +1,27 @@ +#! /bin/bash + +progName="foobar2000" +progRealPath="/usr/share/$progName" +progHome="$HOME/.$progName" +progBin="$progName.exe" + +# Symlink stuff +mkdir -p "$progHome" || exit 1 +# Delete broken symlinks +find -L "$progHome" -type l -delete +# Update existing symlinks, add new symlinks +cp -urs "$progRealPath/"* "$progHome" 2> /dev/null + +# Switches: use -something instead of /something to avoid confusion with Unix paths +# Also convert Unix paths to Windows paths. +declare -a args + +for arg; do + if [[ "${arg:0:1}" = "-" ]]; then + args+=("${arg/#-//}") + else + args+=("$(winepath -w "$arg")") + fi +done + +wine "$progHome/$progBin" "${args[@]}" |