summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2017-07-31 20:05:55 +0200
committerAkemi <der.richter@gmx.de>2017-07-31 20:23:58 +0200
commit12ee13101ba37d2674974eb8e4777104069c9461 (patch)
tree2d51f581f541494fb2a3b1eff39f0b16bc37fefb /TOOLS
parent67506f21b81202f082dab026b92e4f3dcaddff0f (diff)
downloadmpv-12ee13101ba37d2674974eb8e4777104069c9461.tar.bz2
mpv-12ee13101ba37d2674974eb8e4777104069c9461.tar.xz
osx: load the proper profiles and configs in the bundle
different shells need different args to load the expected profiles and configs, so we added a small heuristic to decide those args. also don't always load the profiles for a bash login shell and instead only use the standard shell without any args.
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/osxbundle/mpv.app/Contents/MacOS/mpv-wrapper.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/TOOLS/osxbundle/mpv.app/Contents/MacOS/mpv-wrapper.sh b/TOOLS/osxbundle/mpv.app/Contents/MacOS/mpv-wrapper.sh
index 53dfb4e5c4..f84c27a6e2 100755
--- a/TOOLS/osxbundle/mpv.app/Contents/MacOS/mpv-wrapper.sh
+++ b/TOOLS/osxbundle/mpv.app/Contents/MacOS/mpv-wrapper.sh
@@ -1,4 +1,13 @@
-#!/bin/bash -l
+#!/bin/sh
export MPVBUNDLE="true"
+
+# set the right args for the user specified standard shell
+# to load the expected profiles and configs
+args="-c"
+case "$SHELL" in
+ *bash) args="-l $args";;
+ *zsh) args="-l -i $args";;
+esac
+
cd "$(dirname "$0")"
-$SHELL -c "./mpv --player-operation-mode=pseudo-gui"
+$SHELL $args "./mpv --player-operation-mode=pseudo-gui"