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 "$@"
39 self_new=`cksum "$SELF"`
40 if [ x"$self" != x"$self_new" ]; then
41 msg "./all has changed."
42 if [ -z "$XONOTIC_FORBID_RERUN_ALL" ]; then
43 msg "Rerunning the requested operation to make sure."
44 export XONOTIC_FORBID_RERUN_ALL=1
47 msg "Please try $SELF update, and then retry your requested operation."
62 data/xonotic-data.pk3dir
63 data/xonotic-maps.pk3dir
64 data/xonotic-music.pk3dir
65 data/xonotic-nexcompat.pk3dir
67 fteqcc@git://github.com/Blub/qclib.git
68 div0-gittools@git://git.icculus.org/divverent/div0-gittools.git
72 repos=`for X in $repos_urls; do echo "${X%%@*}"; done`
82 base=`git config remote.origin.url`
83 base=${base%xonotic.git}
84 for dcomplete in $repos_urls; do
97 if [ -d "$d0/$d" ]; then
104 verbose git config remote.origin.url "$url"
110 checkself "$SELF" "$@"
112 verbose git remote prune origin
115 verbose git clone "$url" "$d0/$d"
122 if [ -z "$branch" ]; then
129 if git rev-parse "refs/heads/$branch" >/dev/null 2>&1; then
131 verbose git checkout "$branch"
132 elif git rev-parse "refs/remotes/$remote/$branch" >/dev/null 2>&1; then
134 verbose git checkout --track -b "$branch" "$remote/$branch"
136 verbose git checkout master
139 checkself "$SELF" "$@"
143 echo "The requested branch was not found in any repository."
150 if [ -z "$branch" ]; then
154 if [ -z "$branch" ]; then
157 r=`git symbolic-ref HEAD`
166 while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
167 echo "Branch in \"$d\"?"
170 if [ x"$a" = x"y" ]; then
171 verbose git push "$remote" HEAD:"$branch"
172 verbose git checkout --track -b "$branch" "$remote/$branch"
183 git branch -a | sed 's/^/ /; /->/d'
190 r=`git symbolic-ref HEAD`
192 if git diff HEAD | grep .; then
193 # we have uncommitted changes
195 while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
196 echo "Uncommitted changes in \"$r\" in \"$d\". Commit?"
199 if [ x"$a" = x"y" ]; then
200 verbose git commit -a
203 if git log "origin/$r".."$r" | grep .; then
205 while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
206 echo "Push \"$r\" in \"$d\"?"
209 if [ x"$a" = x"y" ]; then
210 verbose git push `git config "branch.$r.remote" || echo origin` HEAD
217 if [ -z "$MAKEFLAGS" ]; then
218 if [ -f /proc/cpuinfo ]; then
219 ncpus=$((`grep -c '^processor :' /proc/cpuinfo`+0))
220 if [ $ncpus -gt 1 ]; then
225 verbose cd "$d0/fteqcc"
226 verbose make $MAKEFLAGS
227 verbose cd "$d0/data/xonotic-data.pk3dir"
228 verbose make FTEQCC="$d0/fteqcc/fteqcc.bin" $MAKEFLAGS
229 verbose cd "$d0/darkplaces"
230 verbose make $MAKEFLAGS sv-debug
231 verbose make $MAKEFLAGS cl-debug
232 verbose make $MAKEFLAGS sdl-debug
237 sdl|glx|agl|dedicated)
246 if ! [ -x "darkplaces/darkplaces$client" ]; then
247 if [ -x "darkplaces/darkplaces$client.exe" ]; then
250 echo "Client darkplaces/darkplaces$client not found, aborting"
254 #verbose "darkplaces/darkplaces$client" -xonotic "$@"
255 verbose "darkplaces/darkplaces$client" -nexuiz -customgamename Xonotic -customgamedirname1 data -customgamedirname2 "" -customgamescreenshotname xonotic -customgameuserdirname xonotic "$@"
268 echo " $SELF branches"
269 echo " $SELF branch <remote> <branchname>"
270 echo " $SELF checkout"
271 echo " $SELF compile"
272 echo " $SELF run <client> <options>"
273 echo " $SELF each <command>"