From 1bbff3ce1b261ef9cb6ba217ca0d8fcb54971513 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 13 Apr 2009 12:31:42 +0100 Subject: Initial import --- includes/patch-includes.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 includes/patch-includes.sh (limited to 'includes/patch-includes.sh') diff --git a/includes/patch-includes.sh b/includes/patch-includes.sh new file mode 100644 index 0000000..0f76409 --- /dev/null +++ b/includes/patch-includes.sh @@ -0,0 +1,17 @@ +### default variables ### + +[ -z "$PATCHDIR" ] && export PATCHDIR="$PWD" + +### functions ### + +function getpatch +{ + url=$1 + filename=$(basename $url) + + if [ -f "$PATCHDIR/$filename" ]; then + cp "$PATCHDIR/$filename" $TMPDIR || die + else + wget $url -O $TMPDIR/$filename || die + fi +} -- cgit v1.2.3