summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authorThomas Penteker <tek@serverop.de>2017-02-15 00:20:15 +0100
committerThomas Penteker <tek@serverop.de>2017-02-15 00:20:15 +0100
commit43ed834f1931941cbb2e519eddf3156a3cc18944 (patch)
tree6712747bb4e114f0c3def92c0ebf65e913897987 /git
parente3c467469f52d84aa93f05bf5a5e08164e72eb56 (diff)
downloadopt-43ed834f1931941cbb2e519eddf3156a3cc18944.tar.gz
opt-43ed834f1931941cbb2e519eddf3156a3cc18944.tar.xz
git: allow the git port driver to use alternative local repository paths, implements FS#1364
Diffstat (limited to 'git')
-rw-r--r--git/.signature4
-rw-r--r--git/git11
2 files changed, 10 insertions, 5 deletions
diff --git a/git/.signature b/git/.signature
index c1070015b..5dca52f8b 100644
--- a/git/.signature
+++ b/git/.signature
@@ -1,7 +1,7 @@
untrusted comment: verify with /etc/ports/opt.pub
-RWSE3ohX2g5d/XkNSnlsZHvZr+Ee276eVOJSruY/Ey+KG9cGhLuag4ClS1P0lFew5AklBTu/wprgtfZEDDKZWzg7XlkWPjjE8QU=
+RWSE3ohX2g5d/YMF3Jm6ktKhiSMYt26bFYonkVfE4/unLJAF0JMpRB/HOwLXkd6R18xj28OBx7ViW8t3tuMtH9SJRx8mSb9lygk=
SHA256 (Pkgfile) = 9de9f59a4e9344f2d45193837cedc8284b5e924340efd008e0ce1654794a4868
SHA256 (.footprint) = 26ac574bbaa0d50e4e5fc583003b6e9e2f239be20343f2d4c5e8c923b02b55a8
SHA256 (git-2.11.1.tar.xz) = c0a779cae325d48a1d5ba08b6ee1febcc31d0657a6da01fd1dec1c6e10976415
SHA256 (git-manpages-2.11.1.tar.xz) = 69486ed339ee0591001ae83d43c888aa26351b9680b6ceb59e06b593051bca31
-SHA256 (git) = c8c405015dbce8103956966c89477fc3c04ca0da71c2b16663b882d639e25487
+SHA256 (git) = 432108f8c5f5abeb429cab25181b43ee42060d46fa7fbe7e4b02790b56f61e8a
diff --git a/git/git b/git/git
index 9d1f85a0a..654a8c770 100644
--- a/git/git
+++ b/git/git
@@ -23,10 +23,15 @@ if [ -z "$BRANCH" ]; then
exit 2
fi
+REPOSITORY="$PORTS_DIR/$NAME"
+if [ -n "$LOCAL_REPOSITORY" ]; then
+ REPOSITORY="$LOCAL_REPOSITORY"
+fi
+
echo "Fetching updates from $URL"
echo "Updating collection $NAME"
-cd "$PORTS_DIR/$NAME" 2> "/dev/null"
+cd "$REPOSITORY" 2> "/dev/null"
if [ $? -lt 1 ]; then
git checkout -q "$BRANCH"
@@ -35,8 +40,8 @@ if [ $? -lt 1 ]; then
git clean -q -f
git reset -q --hard origin/"$BRANCH"
else
- git clone -q -b "$BRANCH" "$URL" "$PORTS_DIR/$NAME"
- ls /usr/ports/$NAME | sed "s/^/ Checkout /g"
+ git clone -q -b "$BRANCH" "$URL" "$REPOSITORY"
+ ls -1 $REPOSITORY | sed "s/^/ Checkout /"
fi
echo "Finished successfully"

Generated by cgit