aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/synthpod_ui33
1 files changed, 16 insertions, 17 deletions
diff --git a/bin/synthpod_ui b/bin/synthpod_ui
index f4b509b..2d1e613 100644
--- a/bin/synthpod_ui
+++ b/bin/synthpod_ui
@@ -1,30 +1,29 @@
#!/bin/sh
-socket=$1
+set -e
+set -u
# guess pid of running daemon
-if [ -z "${socket}" ]; then
- pid=$(ps -A | grep synthpod | grep -v sand | head -n 1 | awk '{print $1}')
+pid=$( pgrep synthpod | grep -v sand | head -n 1 | awk '{print $1}' )
- if [ -z "${pid}" ]; then
- exit 1
- fi
-
- socket="shm:///synthpod-${pid}"
+if [ -z "${pid}" ]; then
+ exit 1
fi
+socket="shm:///synthpod-${pid}"
+
uri='http://open-music-kontrollers.ch/lv2/synthpod#stereo'
ui='http://open-music-kontrollers.ch/lv2/synthpod#root_4_nk'
-bundle=$(lv2info ${uri} | grep Bundle | head -n1 | sed -e 's/.*file:\/\///g')
+bundle=$( lv2info ${uri} | grep Bundle | head -n1 | sed -e 's/.*file:\/\///g' )
-exec ${GDB} synthpod_sandbox_x11 \
- -p ${uri} \
- -P ${bundle} \
- -u ${ui} \
- -U ${bundle} \
- -s ${socket} \
+exec ${GDB:-} synthpod_sandbox_x11 \
+ -p "${uri}" \
+ -P "${bundle}" \
+ -u "${ui}" \
+ -U "${bundle}" \
+ -s "${socket}" \
-w "Synthpod - ${socket}" \
- -m $((0x1000000)) \
+ -m $(( 0x1000000 )) \
-r 48000 \
-f 30 \
- $*
+ "$@"