6 while ! [ -f ./all ]; do
7 if [ x"`pwd`" = x"/" ]; then
8 echo "Cannot find myself."
9 echo "Please run this script with the working directory inside a Xonotic checkout."
17 # If we are on WINDOWS:
22 # Windows hates users. So this script has to copy itself elsewhere first...
24 cp "$SELF" ../all.xonotic.sh
25 exec ../all.xonotic.sh "$@"
38 if [ -x /usr/bin/md5sum ]; then
40 elif [ -x /bin/md5sum ]; then
42 elif [ -x /usr/bin/cksum ]; then
49 self=`checksum "$SELF"`
52 self_new=`checksum "$SELF"`
53 if [ x"$self" != x"$self_new" ]; then
54 msg "./all has changed."
55 if [ -z "$XONOTIC_FORBID_RERUN_ALL" ]; then
56 msg "Rerunning the requested operation to make sure."
57 export XONOTIC_FORBID_RERUN_ALL=1
60 msg "Please try $SELF update, and then retry your requested operation."
75 data/xonotic-data.pk3dir
76 data/xonotic-maps.pk3dir
77 data/xonotic-music.pk3dir
78 data/xonotic-nexcompat.pk3dir
80 fteqcc@git://github.com/Blub/qclib.git
81 div0-gittools@git://git.icculus.org/divverent/div0-gittools.git
85 repos=`for X in $repos_urls; do echo "${X%%@*}"; done`
95 base=`git config remote.origin.url`
96 base=${base%xonotic.git}
97 for dcomplete in $repos_urls; do
106 url=$base${d##*/}.git
110 if [ -d "$d0/$d" ]; then
117 verbose git config remote.origin.url "$url"
121 verbose git pull || true # errors if the branch is not tracking anything
123 checkself "$SELF" "$@"
125 verbose git remote prune origin
128 verbose git clone "$url" "$d0/$d"
135 if [ -z "$branch" ]; then
142 if git rev-parse "refs/heads/$branch" >/dev/null 2>&1; then
144 verbose git checkout "$branch"
145 elif git rev-parse "refs/remotes/$remote/$branch" >/dev/null 2>&1; then
147 verbose git checkout --track -b "$branch" "$remote/$branch"
149 verbose git checkout master
152 checkself "$SELF" "$@"
156 echo "The requested branch was not found in any repository."
163 if [ -z "$branch" ]; then
167 if [ -z "$branch" ]; then
170 r=`git symbolic-ref HEAD`
179 while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
180 echo "Branch in \"$d\"?"
183 if [ x"$a" = x"y" ]; then
184 verbose git push "$remote" HEAD:"$branch"
185 verbose git checkout --track -b "$branch" "$remote/$branch"
196 git branch -a | sed 's/^/ /; /->/d'
203 r=`git symbolic-ref HEAD`
205 if git diff HEAD | grep .; then
206 # we have uncommitted changes
208 while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
209 echo "Uncommitted changes in \"$r\" in \"$d\". Commit?"
212 if [ x"$a" = x"y" ]; then
213 verbose git commit -a
216 if git log "origin/$r".."$r" | grep .; then
218 while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
219 echo "Push \"$r\" in \"$d\"?"
222 if [ x"$a" = x"y" ]; then
223 verbose git push `git config "branch.$r.remote" || echo origin` HEAD
230 if [ -z "$MAKEFLAGS" ]; then
231 if [ -f /proc/cpuinfo ]; then
232 ncpus=$((`grep -c '^processor :' /proc/cpuinfo`+0))
233 if [ $ncpus -gt 1 ]; then
238 verbose cd "$d0/fteqcc"
239 verbose make $MAKEFLAGS
240 verbose cd "$d0/data/xonotic-data.pk3dir"
241 verbose make FTEQCC="$d0/fteqcc/fteqcc.bin" $MAKEFLAGS
242 verbose cd "$d0/darkplaces"
243 verbose make $MAKEFLAGS sv-debug
244 verbose make $MAKEFLAGS cl-debug
245 verbose make $MAKEFLAGS sdl-debug
250 sdl|glx|agl|dedicated)
259 if ! [ -x "darkplaces/darkplaces$client" ]; then
260 if [ -x "darkplaces/darkplaces$client.exe" ]; then
263 echo "Client darkplaces/darkplaces$client not found, aborting"
267 #verbose "darkplaces/darkplaces$client" -xonotic "$@"
268 verbose "darkplaces/darkplaces$client" -nexuiz -customgamename Xonotic -customgamedirname1 data -customgamedirname2 "" -customgamescreenshotname xonotic -customgameuserdirname xonotic "$@"
281 echo " $SELF branches"
282 echo " $SELF branch <remote> <branchname>"
283 echo " $SELF checkout"
284 echo " $SELF compile"
285 echo " $SELF run <client> <options>"
286 echo " $SELF each <command>"