diff options
Diffstat (limited to 'mshv_launcher.sh')
-rw-r--r-- | mshv_launcher.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mshv_launcher.sh b/mshv_launcher.sh new file mode 100644 index 000000000000..e07a2b576832 --- /dev/null +++ b/mshv_launcher.sh @@ -0,0 +1,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" "$@" |