From c4d7b611eec5b228afed19e53ba9573fc3ac85e1 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 29 Jul 2014 21:11:13 +0100 Subject: Support running the scripts from a direct git clone. --- mga-hdlists-backports | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mga-hdlists-backports') diff --git a/mga-hdlists-backports b/mga-hdlists-backports index 6a0c19b..9137aa0 100755 --- a/mga-hdlists-backports +++ b/mga-hdlists-backports @@ -2,7 +2,12 @@ set -e -. /usr/share/mgatools/functions +LOCALDIR="$(dirname $0)" +if [ -d "$LOCALDIR/.git" -a -f "$LOCALDIR/functions" ]; then + . "$LOCALDIR/functions" +else + . /usr/share/mgatools/functions +fi if [ "$1" = "--dry-run" ]; then dryrun=echo -- cgit v1.2.1