diff options
author | Edward Hervey <bilboed@bilboed.com> | 2013-09-22 11:09:36 +0200 |
---|---|---|
committer | Edward Hervey <edward@collabora.com> | 2013-09-22 15:44:55 +0200 |
commit | 3e4b4eb59bb691c9e1c00a7a5268e68d4444bc7d (patch) | |
tree | 65f7ccb0c752266142edeaf31b10de5860e81e26 | |
parent | 6db013ff7c6b469da67fd3f96d13a091f147f424 (diff) |
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
-rwxr-xr-x | scripts/gst-uninstalled | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/scripts/gst-uninstalled b/scripts/gst-uninstalled index dd1ffa9ae..633dff8ef 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 - -# -# 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` +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! + # + + # 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 !" |