6 url=http://141.2.16.23/~xonotic/bsp-autobuilds/
8 bspoutdir="$HOME/public_html/bsp-autobuilds/"
12 for F in maps/*.map.options; do
13 if ! [ -f "$F" ]; then
16 if ! [ -f "${F%.options}" ]; then
21 blobhash=`git ls-files -s -- "$F" | cut -d ' ' -f 2`-`git ls-files -s -- "${F%.options}" | cut -d ' ' -f 2`
31 if [ -f "$bspdir/$M-$blobhash.pk3" ]; then
36 ../../../misc/tools/xonotic-map-compiler "$M" -noshaderlist `head -n 1 "$M.map.options"` 2>&1 | tee "$M.log"
38 zip -9r "$bspdir/$M-$blobhash.pk3" "maps/$M.bsp" "maps/$M.log" "maps/$M/" "maps/$M.lin" "gfx/${M}_mini.tga"
39 ln -snf "../$M-$blobhash.pk3" "$bspdir/latest/$M.pk3" # from ALL branches, so beware!
48 if [ -f "$bspdir/$M-$blobhash.pk3" ]; then
51 if ! wget -O "$bspdir/$M-$blobhash.pk3" "$url$M-$blobhash.pk3"; then
52 rm -f "$bspdir/$M-$blobhash.pk3"
53 echo "WARNING: could not download $url$M-$blobhash.pk3, maybe not ready yet"
56 if ! unzip -l "$bspdir/$M-$blobhash.pk3"; then
57 rm -f "$bspdir/$M-$blobhash.pk3"
58 echo "WARNING: could not download $url$M-$blobhash.pk3, invalid zip file"
66 mkdir -p "$bspoutdir/latest"
67 cd data/xonotic-maps.pk3dir
68 git for-each-ref 'refs/remotes' | while read -r HASH TYPE REFNAME; do
72 allmaps buildthemap "$bspoutdir"
78 cd data/xonotic-maps.pk3dir
79 allmaps getthemap "$url" "$bspdir"