summarylogtreecommitdiffstats
path: root/crowbar
blob: cc119476e5809febdf8979441f72cc484312420a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
export WINEPREFIX="$HOME/.local/share/wineprefixes/crowbar"
export WINEDEBUG=-all

declare -a args

for arg; do
  if [[ "${arg:0:1}" = "-" ]]; then
    args+=("${arg/#-//}")
  else
    args+=("$(winepath -w "$arg")")
  fi
done

wine /usr/share/crowbar/crowbar.exe "${args[@]}"
EXIT=$?

if [[ $EXIT -ne 0 ]]; then
  echo "Error: Crowbar failed to launch!"
  echo -e "If Crowbar didn't start, you should try deleting your Crowbar Wine prefix and restart:"
  echo "rm -dr ~/.local/share/wineprefixes/crowbar"
  exit $EXIT
fi