summaryrefslogtreecommitdiff
path: root/pw-uninstalled.sh
diff options
context:
space:
mode:
authorArun Raghavan <arun@arunraghavan.net>2018-09-23 06:25:16 +0530
committerWim Taymans <wim.taymans@gmail.com>2018-09-25 09:50:27 +0200
commit9fdb8a0e5f4da704338d5ab38df4682f8b48f5d4 (patch)
tree49f15ee0434c365d49f091aa15c365983859a067 /pw-uninstalled.sh
parent58efa8c2f439caae6b7885dd4c4018da9adfb5bc (diff)
meson: Add an uninstalled target and script
This makes it easier to run PipeWire from the build environment
Diffstat (limited to 'pw-uninstalled.sh')
-rwxr-xr-xpw-uninstalled.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/pw-uninstalled.sh b/pw-uninstalled.sh
new file mode 100755
index 00000000..4054f704
--- /dev/null
+++ b/pw-uninstalled.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+set -e
+
+while getopts ":b:" opt; do
+ case ${opt} in
+ b)
+ BUILDDIR=${OPTARG}
+ ;;
+ \?)
+ echo "Invalid option: -${OPTARG}"
+ exit -1
+ ;;
+ :)
+ echo "Option -${OPTARG} requires an argument"
+ exit -1
+ ;;
+ esac
+done
+
+if [ -z "${BUILDDIR}" ]; then
+ BUILDDIR=${PWD}/build
+ echo "Using default build directory: ${BUILDDIR}"
+fi
+
+if [ ! -d ${BUILDDIR} ]; then
+ echo "Invalid build directory: ${BUILDDIR}"
+ exit -1
+fi
+
+export PIPEWIRE_CONFIG_FILE="${BUILDDIR}/src/daemon/pipewire.conf"
+export SPA_PLUGIN_DIR="${BUILDDIR}/spa/plugins"
+export PIPEWIRE_MODULE_DIR="${BUILDDIR}/src/modules"
+export PATH="${BUILDDIR}/src/daemon:${PATH}"
+
+# FIXME: find a nice, shell-neutral way to specify a prompt
+${SHELL}