summarylogtreecommitdiffstats
path: root/mshv_launcher.sh
blob: e07a2b5768325c2f1913d818831db207198c6a9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

# This is a launcher script provided by the `mshv` package. 
# Copying the files is necessary, because MSHV can only work 
# with configs and files in the same directory as the executable.

pkgname="mshv"
WORKDIR="${WORKDIR:-"$HOME/.local/share/$pkgname"}"

if [ ! -d "$WORKDIR" ]; then
	cp -r "/usr/share/$pkgname" "$WORKDIR"
fi

# There was an update.
if ! cmp -s "/usr/bin/${pkgname}_bin" "$WORKDIR/mshv"; then
	cp "/usr/bin/${pkgname}_bin" "$WORKDIR/mshv"
fi

"$WORKDIR/mshv" "$@"