From 55a3dea992ffb6cf7f8b767e0b39a30e6c81a155 Mon Sep 17 00:00:00 2001 From: Suvayu Ali Date: Sun, 2 Dec 2018 09:15:40 +0530 Subject: [PATCH] bootstrap.sh: configurable prefix path --- bootstrap.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index d61d4bf..b4c90e4 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -19,15 +19,18 @@ if [ ! -f "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" ]; then [[ $REPLY =~ ^[Yy]$ ]] fi +# accept a prefix value as: prefix=/path ./bootstrap.sh +: ${prefix:=/usr} + # Echo the rest so it's obvious set -x -meson --prefix=/usr build -Dwith-systemd-user-unit-dir=/etc/systemd/user +meson --prefix=$prefix build -Dwith-systemd-user-unit-dir=/etc/systemd/user cd build ninja # Verify user wants to install set +x -read -p "Install to /usr? [Yy] " -r +read -p "Install to $prefix? [Yy] " -r [[ $REPLY =~ ^[Yy]$ ]] set -x