summaryrefslogtreecommitdiff
path: root/includes/patch-includes.sh
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2009-04-13 12:31:42 +0100
committerNick White <git@njw.me.uk>2009-04-13 12:31:42 +0100
commit1bbff3ce1b261ef9cb6ba217ca0d8fcb54971513 (patch)
treeac5ca6418afec68f5f5c3f2f84601559d41d144b /includes/patch-includes.sh
downloadgemrb-gameinstallers-1bbff3ce1b261ef9cb6ba217ca0d8fcb54971513.tar.bz2
gemrb-gameinstallers-1bbff3ce1b261ef9cb6ba217ca0d8fcb54971513.zip
Initial import
Diffstat (limited to 'includes/patch-includes.sh')
-rw-r--r--includes/patch-includes.sh17
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
+}