diff options
Diffstat (limited to 'includes/patch-includes.sh')
-rw-r--r-- | includes/patch-includes.sh | 17 |
1 files changed, 17 insertions, 0 deletions
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 +} |