add mixer actions for toggle disk & input monitoring; bind to d and i in mixer bindings
[ardour.git] / tools / linux_packaging / install.sh
index bedabf9fc43a562887f8fc34c6d9581cd9bb7b8d..3041c266843dc72d3361facf20b1f04a6c6c659d 100755 (executable)
@@ -10,16 +10,19 @@ SAVED_PWD=$PWD
 PKG_PATH=$(dirname "$(readlink -f "$0")")
 cd "${PKG_PATH}"
 
-if [ -z "$TERM" ] || [ "$TERM" = "dumb" ] || [ -z "$PS1" ]; then
+# check for an interactive terminal
+# -t fd - Returns true if file descriptor fd is open and refers to a terminal. 
+# fd 1 is stdout
+if [ ! -t 1 ]; then
        if which xterm > /dev/null; then
-               exec xterm -e "${PKG_PATH}/.stage2.run"
+               exec xterm -e "${PKG_PATH}/.stage2.run $@"
        elif which gnome-terminal > /dev/null; then
-               exec gnome-terminal -e "${PKG_PATH}/.stage2.run"
+               exec gnome-terminal -e "${PKG_PATH}/.stage2.run $@"
        elif which konsole > /dev/null; then
-               exec konsole -e "${PKG_PATH}/.stage2.run"
+               exec konsole -e "${PKG_PATH}/.stage2.run $@"
        fi
 else
-       "${PKG_PATH}/.stage2.run"
+       "${PKG_PATH}/.stage2.run" "$@"
 fi
 
 cd "${SAVED_PWD}"