Commit 36f5fb370c3ebe0c7a049c6cfe2cd550781cd1b1

Authored by Georg Hopp
1 parent bcb4af4c

still fixing wine exe, lnk and dosbox calls...by the way simplify script

Showing 1 changed file with 18 additions and 22 deletions
... ... @@ -8,28 +8,24 @@
8 8 # 2017-02-07 Start work on this
9 9 #
10 10
11   -function get_interpreter() {
12   - local EXE="$1"
13   -
14   - echo "$(basename "${EXE}")" >&2
15   -
16   - case "$(file -b "${EXE}")" in
17   - *DOS*)
18   - local CONFIG="${HOME}/.dosbox/$(basename "${EXE}").conf"
19   - if [ ! \( -e "${CONFIG}" \) ]
20   - then
21   - cp "${HOME}/.dosbox/dosbox-SVN.conf" "${CONFIG}"
22   - fi
23   - echo -n "/usr/bin/dosbox -exit -conf ${CONFIG}"
24   - ;;
25   - *Windows\ shortcut*) echo -n "/usr/bin/wine start";;
26   - *Windows*) echo -n "/usr/bin/wine";;
27   - esac
28   -}
29   -
30 11 EXE="$1"; shift
31   -WINEXE="${EXE/${WINEPREFIX}drive_c/C:}"
32   -WINEXE="${WINEXE//\//\\}"
33   -exec $(get_interpreter "${EXE}") "${WINEXE}" "$@"
  12 +
  13 +case "$(file -b "${EXE}")" in
  14 + *DOS*)
  15 + local CONFIG="${HOME}/.dosbox/$(basename "${EXE}").conf"
  16 + if [ ! \( -e "${CONFIG}" \) ]
  17 + then
  18 + cp "${HOME}/.dosbox/dosbox-SVN.conf" "${CONFIG}"
  19 + fi
  20 + exec /usr/bin/dosbox -exit -conf "${CONFIG}" "${EXE}" "$@"
  21 + ;;
  22 + *Windows\ shortcut*)
  23 + WINEXE="${EXE/${WINEPREFIX}drive_c/C:}"
  24 + WINEXE="${WINEXE//\//\\}"
  25 + exec /usr/bin/wine start "${WINEXE}" "$@"
  26 + ;;
  27 + *Windows*) exec /usr/bin/wine "${EXE}" "$@";;
  28 + *) exec "${EXE}" "${@}";;
  29 +esac
34 30
35 31 # vim: ft=sh ts=4 sw=4:
... ...
Please register or login to post a comment