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/git | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 modules/ports/drivers/git (limited to 'modules/ports/drivers/git') diff --git a/modules/ports/drivers/git b/modules/ports/drivers/git new file mode 100755 index 0000000..e4b301b --- /dev/null +++ b/modules/ports/drivers/git @@ -0,0 +1,28 @@ +#!/bin/sh +# +# /etc/ports/drivers/git: git 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 + +if [ -d $ROOT_DIR ]; then + cd $ROOT_DIR + git pull +else + git clone $URL $ROOT_DIR +fi +# End of file. -- cgit v1.2.3-70-g09d2