summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functions2
-rwxr-xr-xmga-hdlists7
-rwxr-xr-xmga-hdlists-backports7
-rwxr-xr-xmga-hdlists-cauldron7
-rwxr-xr-xmga-hdlists-updates7
-rwxr-xr-xmga-move-pkg7
6 files changed, 31 insertions, 6 deletions
diff --git a/functions b/functions
index 5f0ae18..992157f 100644
--- a/functions
+++ b/functions
@@ -14,7 +14,7 @@ distroreleases='1 2 3 4'
arches='i586 x86_64'
mirror_rsync_options="--dry-run -v --delete -alH"
-. /etc/mgatools.conf
+[ -f /etc/mgatools.conf ] && . /etc/mgatools.conf
function isingroup()
{
diff --git a/mga-hdlists b/mga-hdlists
index f14407f..37dc31d 100755
--- a/mga-hdlists
+++ b/mga-hdlists
@@ -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
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
diff --git a/mga-hdlists-cauldron b/mga-hdlists-cauldron
index dc4404c..ca85344 100755
--- a/mga-hdlists-cauldron
+++ b/mga-hdlists-cauldron
@@ -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
diff --git a/mga-hdlists-updates b/mga-hdlists-updates
index 66f3e7e..ee2f71f 100755
--- a/mga-hdlists-updates
+++ b/mga-hdlists-updates
@@ -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
diff --git a/mga-move-pkg b/mga-move-pkg
index 3bfcae3..b757ba9 100755
--- a/mga-move-pkg
+++ b/mga-move-pkg
@@ -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