blob: f26d04906752d49b7428c01f2bc4cd64c0c5c02c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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[@]}"
|