summaryrefslogtreecommitdiffstats
path: root/modules/ports/drivers/hg
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.servegame.org>2011-06-02 15:08:03 +0200
committerpiernov <piernov@piernov.servegame.org>2011-06-02 15:08:03 +0200
commit762f732c33432c9a6f488dd5618e19b26fe47609 (patch)
tree878104dccdc4389a1f523472f2f4e08a24e99777 /modules/ports/drivers/hg
parentec823fb412e4574e4d2dcd4c0f58dff01ee549e6 (diff)
downloadrbjbbot-master.tar.gz
rbjbbot-master.tar.bz2
rbjbbot-master.tar.xz
rbjbbot-master.zip
Réécrit entièrement.HEADmaster
Diffstat (limited to 'modules/ports/drivers/hg')
-rwxr-xr-xmodules/ports/drivers/hg27
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/ports/drivers/hg b/modules/ports/drivers/hg
new file mode 100755
index 0000000..776cb89
--- /dev/null
+++ b/modules/ports/drivers/hg
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# /etc/ports/drivers/hg: mercurial driver script for ports(8)
+#
+
+if [ $# -ne 1 ]; then
+ echo "usage: $0 <file>" >&2
+ exit 1
+fi
+
+. $1
+
+if [ -z "$ROOT_DIR" ]; then
+ echo "ROOT_DIR not set in '$1'" >&2
+ exit 2
+fi
+if [ -z "$URL" ]; then
+ echo "URL not set in '$1'" >&2
+ exit 2
+fi
+
+for REPO in $URL; do
+ PORT=`echo $REPO | sed -n '/#.*$/s|^.*#||p'`
+ hg -v clone $REPO $ROOT_DIR/$PORT
+done
+
+# End of file.