summaryrefslogtreecommitdiff
path: root/sdk/fetchsrc
diff options
context:
space:
mode:
Diffstat (limited to 'sdk/fetchsrc')
-rwxr-xr-xsdk/fetchsrc18
1 files changed, 18 insertions, 0 deletions
diff --git a/sdk/fetchsrc b/sdk/fetchsrc
new file mode 100755
index 0000000..1c03a92
--- /dev/null
+++ b/sdk/fetchsrc
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -x
+
+# script to fetch toolchain source tar using ci.netsurf-browser.org as a cache
+
+# Usage fetchsrc <target> <source> <upstream> <output>
+
+NSSRV="http://ci.netsurf-browser.org/toolchain/"
+
+wget -q -O ${4} ${NSSRV}/${1}/${2}
+if [ $? -ne 0 ];then
+ wget -q -O ${4} ${3}
+ if [ $? -ne 0 ];then
+ rm ${4}
+ return 1
+ fi
+fi