summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2020-06-29 18:09:31 +0200
committerOskar Nyberg <oskar@mullvad.net>2020-06-29 18:09:31 +0200
commitd990a6283341ce97601df5a386eab4001baec457 (patch)
treee02a7b1ea89588b6adfbe156cd8752dbea0b3958
parentb70f4f7bffbd51ec09923e3a67548cd2f0adc220 (diff)
downloadmullvadvpn-d990a6283341ce97601df5a386eab4001baec457.tar.xz
mullvadvpn-d990a6283341ce97601df5a386eab4001baec457.zip
Change fish completions directory and only symlink if directory exists
-rwxr-xr-xdist-assets/pkg-scripts/postinstall5
1 files changed, 4 insertions, 1 deletions
diff --git a/dist-assets/pkg-scripts/postinstall b/dist-assets/pkg-scripts/postinstall
index 9e6db15a6f..40de4cee50 100755
--- a/dist-assets/pkg-scripts/postinstall
+++ b/dist-assets/pkg-scripts/postinstall
@@ -49,6 +49,7 @@ EOM
)
ZSH_COMPLETIONS_DIR="/usr/local/share/zsh/site-functions/"
+FISH_COMPLETIONS_DIR="/usr/local/share/fish/vendor_completions.d/"
"$INSTALL_DIR/Mullvad VPN.app/Contents/Resources/mullvad-setup" prepare-restart || true
@@ -63,7 +64,9 @@ mkdir -p /usr/local/bin
ln -sf "$INSTALL_DIR/Mullvad VPN.app/Contents/Resources/mullvad" /usr/local/bin/mullvad
ln -sf "$INSTALL_DIR/Mullvad VPN.app/Contents/Resources/mullvad-problem-report" /usr/local/bin/mullvad-problem-report
-ln -sf "$INSTALL_DIR/Mullvad VPN.app/Contents/Resources/mullvad.fish" /usr/share/fish/vendor_completions.d
+if [ -d "$FISH_COMPLETIONS_DIR" ]; then
+ ln -sf "$INSTALL_DIR/Mullvad VPN.app/Contents/Resources/mullvad.fish" $FISH_COMPLETIONS_DIR
+fi
mkdir -p "$ZSH_COMPLETIONS_DIR"
ln -sf "$INSTALL_DIR/Mullvad VPN.app/Contents/Resources/_mullvad" "$ZSH_COMPLETIONS_DIR/_mullvad"