Of course, attaching the file first might be a good plan :)
#!/bin/bash # A wine wrapper script. In Vino Veritas! # v1.0 (C) Mike Hearn mike@navi.cx
# Licensed under the GPL
for a in $@; do if [[ "${a:0:1}" == "+" ]] || [[ "${a:0:1}" == "-" ]]; then if [[ "$WINEDEBUG" != "" ]]; then WINEDEBUG="$WINEDEBUG,$a" shift else WINEDEBUG="$a" shift fi elif [[ "${a%=n}" != "$a" ]] || [[ "${a%=b}" != "$a" ]]; then WINEDLLOVERRIDES="$a $WINEDLLOVERRIDES" shift fi done
red="\033[1;31m" normal="\033[0m"
export WINEDEBUG WINEDLLOVERRIDES if [[ "$WINEDEBUG" != "" ]]; then echo -e "${red}debug channels:${normal} $WINEDEBUG"; fi if [[ "$WINEDLLOVERRIDES" != "" ]]; then echo -e "${red}dll overrides:${normal} $WINEDLLOVERRIDES"; fi wine $@