Files
wireplumber/wp-uninstalled.sh
George Kiagiadakis 3b144fa9ca Add a wp-uninstalled.sh script for easily running programs uninstalled
Similar to pw-uninstalled.sh, but without an interactive shell
2021-04-26 09:59:33 +03:00

43 lines
867 B
Bash
Executable File

#!/usr/bin/env bash
set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
BUILDDIR=${SCRIPT_DIR}/build
CONFIGDIR=config
while getopts ":b:c:" opt; do
case ${opt} in
b)
BUILDDIR=${OPTARG}
shift 2
;;
c)
CONFIGDIR=${OPTARG}
;;
\?)
echo "Invalid option: -${OPTARG}"
exit -1
;;
:)
echo "Option -${OPTARG} requires an argument"
exit -1
;;
esac
done
shift $((OPTIND-1))
if [ ! -d ${BUILDDIR} ]; then
echo "Invalid build directory: ${BUILDDIR}"
exit -1
fi
export WIREPLUMBER_MODULE_DIR="${BUILDDIR}/modules"
export WIREPLUMBER_CONFIG_DIR="${SCRIPT_DIR}/src/${CONFIGDIR}"
export WIREPLUMBER_DATA_DIR="${SCRIPT_DIR}/src"
export PATH="${BUILDDIR}/src:${BUILDDIR}/src/tools:$PATH"
export LD_LIBRARY_PATH="${BUILDDIR}/lib/wp:$LD_LIBRARY_PATH"
exec $@