]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - download-data.sh
add a simple data downloader
[xonotic/xonotic.git] / download-data.sh
diff --git a/download-data.sh b/download-data.sh
new file mode 100755 (executable)
index 0000000..e914ce0
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+       local)
+               base=ssh://gitolite
+               ;;
+       ssh)
+               base=ssh://xonotic@git.xonotic.org
+               ;;
+       git)
+               base=git://git.xonotic.org/xonotic
+               ;;
+       http)
+               base=http://git.xonotic.org/~xonotic
+               ;;
+       *)
+               echo "Usage: $0 transport, where transport might be local, ssh, git or http"
+               exit 1
+               ;;
+esac
+
+mkdir -p data
+git clone "$base/xonotic-data.pk3dir" data/xonotic-data.pk3dir
+git clone "$base/xonotic-maps.pk3dir" data/xonotic-maps.pk3dir
+git clone "$base/xonotic-music.pk3dir" data/xonotic-music.pk3dir