# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1558149850 -7200
#      Sat May 18 05:24:10 2019 +0200
# Node ID 044529cd8edf550355e5bc7e11b1d90fdf70e43b
# Parent  3bd277f0a829a25c0dd521029696563b90c3b707
setup: automatic support for a `./local.repos` file

If the `local.repos` file is present, it will be read instead of the
`default.repos` file. The file itself is not tracked by version control, it
is... local

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -13,4 +13,5 @@
 Pipfile
 Pipfile.lock
 .python-version
-.idea/
\ No newline at end of file
+.idea/
+local.repos
diff --git a/lib/before-check.sh b/lib/before-check.sh
--- a/lib/before-check.sh
+++ b/lib/before-check.sh
@@ -36,7 +36,11 @@
     fi
 fi
 
-./script/setup-repos ./default.repos ./repos
+repofiles="./default.repos"
+if [ -e "./local.repos" ]; then
+    repofiles="./local.repos"
+fi
+./script/setup-repos $repofiles ./repos
 
 python ./create_skip_file.py