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
This commit is contained in:
Edward Hervey 2013-09-22 11:09:36 +02:00 committed by Edward Hervey
parent 6db013ff7c
commit 3e4b4eb59b

View file

@ -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 !"