#!/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.