summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTitanSnow <[email protected]>2017-04-19 12:30:21 +0800
committerTitanSnow <[email protected]>2017-04-19 12:36:06 +0800
commit11c5bbc8834916441d1c3ceb18dadcb01004b931 (patch)
treebfeb8c4b7cc3ddc7488f170bc6fceb3235d5f96e
parent73ec574090bff132f9ef18b5a8fa9e3c76118973 (diff)
add get.sh
-rwxr-xr-xscripts/get.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/get.sh b/scripts/get.sh
new file mode 100755
index 000000000..eb3ae0657
--- /dev/null
+++ b/scripts/get.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# xmake getter
+# usage: bash <(curl -s <my location>) [branch]
+
+branch=
+if [ x != x$1 ];then branch="-b $1";fi
+git clone --depth=1 $branch https://github.com/tboox/xmake.git /tmp/$$xmake_getter || exit $?
+make -C /tmp/$$xmake_getter --no-print-directory build || exit $?
+if [ 0 -eq $(id -u) ]
+then
+ make -C /tmp/$$xmake_getter --no-print-directory install || exit $?
+else
+ sudo make -C /tmp/$$xmake_getter --no-print-directory install || exit $?
+fi
+rm -rf /tmp/$$xmake_getter
+xmake --version
+exit $?