Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- executableDirectory="$HOME/.foobar2000"
- wineCommand="env wine"
- executable="foobar2000.exe"
- command="$wineCommand $executableDirectory/$executable"
- if [ ! -z "$1" ]; then
- ARGUMENTS=()
- for argument in "$@"
- do
- if [[ "$argument" == --* ]]; then
- argument=${argument/--/"/"}
- argument=${argument//-/"\ "}
- else
- argument=$(readlink -f "$argument")
- argument=`echo z:$argument | sed 's/\\//\\\\/g'`
- argument="\"$argument\""
- fi
- ARGUMENTS+=($argument)
- done
- command=$command" ""${ARGUMENTS[*]}"
- fi
- bash -c "cd $executableDirectory"
- bash -c "$command &"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement