From 762f732c33432c9a6f488dd5618e19b26fe47609 Mon Sep 17 00:00:00 2001 From: piernov Date: Thu, 2 Jun 2011 15:08:03 +0200 Subject: Réécrit entièrement. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/ports/drivers/hg | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 modules/ports/drivers/hg (limited to 'modules/ports/drivers/hg') 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 " >&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. -- cgit v1.2.3-70-g09d2