From 3e4b4eb59bb691c9e1c00a7a5268e68d4444bc7d Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sun, 22 Sep 2013 11:09:36 +0200 Subject: [PATCH] gst-uninstalled: Allow specifying the checkout directory by env variable For some rare cases, one might not be able to use the hardcoded $HOME/gst location yet would still want to use the gst-uninstalled script as-is (which has the benefit of being constantly updated). For these cases, the checkout directory can be specified with the GST_UNINSTALLED_ROOT environment variable. Ex: export GST_UNINSTALLED_ROOT=$HOME/somewhere/with/checkouts And then just call gst-uninstalled directly: $GST_UNINSTALLED_ROOT/gstreamer/gst-uninstalled --- scripts/gst-uninstalled | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/scripts/gst-uninstalled b/scripts/gst-uninstalled index dd1ffa9ae2..633dff8efc 100755 --- a/scripts/gst-uninstalled +++ b/scripts/gst-uninstalled @@ -27,19 +27,30 @@ # This script is run -i so that PS1 doesn't get cleared -# Change this variable to the location of your gstreamer git checkouts -MYGST=$HOME/gst +if [ -z $GST_UNINSTALLED_ROOT ]; +then + # Change this variable to the location of your gstreamer git checkouts + MYGST=$HOME/gst -# -# Everything below this line shouldn't be edited! -# + # + # Everything below this line shouldn't be edited! + # -# extract version from $0 -# if this script is called "gst-head" then version will be "head" -VERSION=`echo $0 | sed s/.*gst-//g` + # extract version from $0 + # if this script is called "gst-head" then version will be "head" + VERSION=`echo $0 | sed s/.*gst-//g` + + # base path under which dirs are installed + GST=$MYGST/$VERSION +else + # Alternatively, you can set the GST_UNINSTALLED_ROOT environment variable to the + # location of your checkout and call this script directly. + # + # Ex: GST_UNINSTALLED_ROOT=$HOME/checkout/location gst-uninstalled + + GST=$GST_UNINSTALLED_ROOT +fi -# base path under which dirs are installed -GST=$MYGST/$VERSION GST_PREFIX=$GST/prefix if test ! -e $GST; then echo "$GST does not exist !"