summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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"