mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-22 03:11:27 +00:00
Got Xonotic stuff for check-proj to function.
This commit is contained in:
parent
330111d5fc
commit
3968dc84fd
2 changed files with 47 additions and 31 deletions
|
@ -12,7 +12,7 @@ download_hashes=$(wget -qO- ${hashes})
|
||||||
download_options=$(wget -qO- ${options})
|
download_options=$(wget -qO- ${options})
|
||||||
|
|
||||||
download() {
|
download() {
|
||||||
pushd ~/.gmqcc/testsuite >> /dev/null
|
pushd ~/.gmqcc/testsuite > /dev/null
|
||||||
echo "$download_list" | while read -r line
|
echo "$download_list" | while read -r line
|
||||||
do
|
do
|
||||||
echo "downloading $line ..."
|
echo "downloading $line ..."
|
||||||
|
@ -22,7 +22,7 @@ download() {
|
||||||
echo "$download_hashes" > ~/.gmqcc/testsuite/hashes
|
echo "$download_hashes" > ~/.gmqcc/testsuite/hashes
|
||||||
echo "$download_options" > ~/.gmqcc/testsuite/options
|
echo "$download_options" > ~/.gmqcc/testsuite/options
|
||||||
|
|
||||||
popd >> /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$download_list" -o -z "$download_hashes" -o -z "$download_options" ]; then
|
if [ -z "$download_list" -o -z "$download_hashes" -o -z "$download_options" ]; then
|
||||||
|
@ -44,9 +44,9 @@ if [ -f ~/.gmqcc/testsuite/hashes -a -f ~/.gmqcc/testsuite/options ]; then
|
||||||
echo "$download_hashes" > /tmp/gmqcc_download_hashes
|
echo "$download_hashes" > /tmp/gmqcc_download_hashes
|
||||||
echo "$download_options" > /tmp/gmqcc_download_options
|
echo "$download_options" > /tmp/gmqcc_download_options
|
||||||
|
|
||||||
diff -u ~/.gmqcc/testsuite/hashes /tmp/gmqcc_download_hashes >> /dev/null
|
diff -u ~/.gmqcc/testsuite/hashes /tmp/gmqcc_download_hashes > /dev/null
|
||||||
check_hash=$?
|
check_hash=$?
|
||||||
diff -u ~/.gmqcc/testsuite/options /tmp/gmqcc_download_options >> /dev/null
|
diff -u ~/.gmqcc/testsuite/options /tmp/gmqcc_download_options > /dev/null
|
||||||
check_opts=$?
|
check_opts=$?
|
||||||
|
|
||||||
if [ $check_hash -ne 0 -o $check_opts -ne 0 ]; then
|
if [ $check_hash -ne 0 -o $check_opts -ne 0 ]; then
|
||||||
|
@ -68,14 +68,14 @@ fi
|
||||||
|
|
||||||
if [ ! -d ~/.gmqcc/testsuite/projects ]; then
|
if [ ! -d ~/.gmqcc/testsuite/projects ]; then
|
||||||
mkdir -p ~/.gmqcc/testsuite/projects
|
mkdir -p ~/.gmqcc/testsuite/projects
|
||||||
pushd ~/.gmqcc/testsuite/projects >> /dev/null
|
pushd ~/.gmqcc/testsuite/projects > /dev/null
|
||||||
echo "$(ls ../ | cat | grep -v '^hashes$' | grep -v '^projects$')" | while read -r line
|
echo "$(ls ../ | cat | grep -v '^hashes$' | grep -v '^projects$' | grep -v '^options$')" | while read -r line
|
||||||
do
|
do
|
||||||
echo "extracting project $line"
|
echo "extracting project $line"
|
||||||
mkdir "$(echo "$line" | sed 's/\(.*\)\..*/\1/')"
|
mkdir "$(echo "$line" | sed 's/\(.*\)\..*/\1/')"
|
||||||
unzip -qq "../$line" -d $(echo "$line" | sed 's/\(.*\)\..*/\1/')
|
unzip -qq "../$line" -d $(echo "$line" | sed 's/\(.*\)\..*/\1/')
|
||||||
done
|
done
|
||||||
popd >> /dev/null
|
popd > /dev/null
|
||||||
else
|
else
|
||||||
echo "previous state exists, using it"
|
echo "previous state exists, using it"
|
||||||
fi
|
fi
|
||||||
|
@ -96,18 +96,41 @@ env -i type gmqcc 1>/dev/null 2>&1 || {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pushd ~/.gmqcc/testsuite/projects >> /dev/null
|
pushd ~/.gmqcc/testsuite/projects > /dev/null
|
||||||
find . -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | while read -r line
|
find . -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | while read -r line
|
||||||
do
|
do
|
||||||
|
error=0
|
||||||
echo -n "compiling $line... "
|
echo -n "compiling $line... "
|
||||||
pushd "$line" >> /dev/null
|
pushd "$line" > /dev/null
|
||||||
"$gmqcc_bin" $(cat ../../options | grep "$line:" | awk '{print $2}') > /dev/null 2>&1
|
|
||||||
if [ $? -ne 0 ]; then
|
# does the project have multiple subprojects?
|
||||||
|
if [ -f dirs ]; then
|
||||||
|
cat dirs | while read -r dir
|
||||||
|
do
|
||||||
|
# change to subproject
|
||||||
|
pushd "$dir" > /dev/null
|
||||||
|
"$gmqcc_bin" $(cat ../../../options | grep "$line:" | awk '{print $2}') > /dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
error=1
|
||||||
|
fi
|
||||||
|
popd > /dev/null
|
||||||
|
done
|
||||||
|
# nope only one project
|
||||||
|
else
|
||||||
|
"$gmqcc_bin" $(cat ../../options | grep "$line:" | awk '{print $2}') > /dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
error=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# status
|
||||||
|
if [ $error -ne 0 ]; then
|
||||||
echo "error"
|
echo "error"
|
||||||
else
|
else
|
||||||
echo "success"
|
echo "success"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
popd >> /dev/null
|
popd > /dev/null
|
||||||
done
|
done
|
||||||
popd >> /dev/null
|
|
||||||
|
popd > /dev/null
|
||||||
|
|
|
@ -9,7 +9,7 @@ else
|
||||||
pushd qcsrc > /dev/null
|
pushd qcsrc > /dev/null
|
||||||
if [ ! -d client -o ! -d common -o ! -d dpdefs -o ! -d menu -o ! -d server -o ! -d warpzonelib ]; then
|
if [ ! -d client -o ! -d common -o ! -d dpdefs -o ! -d menu -o ! -d server -o ! -d warpzonelib ]; then
|
||||||
echo "this doesnt look like a xonotic source tree, aborting"
|
echo "this doesnt look like a xonotic source tree, aborting"
|
||||||
popd >> /dev/null
|
popd > /dev/null
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -25,32 +25,25 @@ else
|
||||||
echo "complete"
|
echo "complete"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "removing redundant files ... "
|
echo -n "removing redundant files ..."
|
||||||
rm -f autocvarize.pl
|
rm -f Makefile
|
||||||
rm -f autocvarize-update.sh
|
rm -f autocvarize-update.sh
|
||||||
|
rm -f autocvarize.pl
|
||||||
rm -f collect-precache.sh
|
rm -f collect-precache.sh
|
||||||
rm -f fteqcc-bugs.qc
|
rm -f fteqcc-bugs.qc
|
||||||
rm -f i18n-badwords.txt
|
rm -f i18n-badwords.txt
|
||||||
rm -f i18n-guide.txt
|
rm -f i18n-guide.txt
|
||||||
rm -rf server-testcase
|
|
||||||
rm -f Makefile
|
|
||||||
rm -f *.src
|
|
||||||
rm -f qccversion.*
|
|
||||||
echo "complete"
|
echo "complete"
|
||||||
|
|
||||||
cat client/progs.src | sed "s/\.\.\///" > client.src
|
echo -n "creating projects ..."
|
||||||
cat server/progs.src | sed "s/\.\.\///" > server.src
|
echo "client" > dirs
|
||||||
cat menu/progs.src | sed "s/\.\.\///" > menu.src
|
echo "server" >> dirs
|
||||||
|
echo "menu" >> dirs
|
||||||
|
|
||||||
echo "creating zip archives..."
|
echo "complete"
|
||||||
cp client.src progs.src
|
|
||||||
cat progs.src | zip ../xonotic-client.zip -@ > /dev/null
|
|
||||||
cp server.src progs.src
|
|
||||||
cat progs.src | zip ../xonotic-server.zip -@ > /dev/null
|
|
||||||
cp menu.src progs.src
|
|
||||||
cat progs.src | zip ../xonotic-menu.zip -@ > /dev/null
|
|
||||||
rm client.src server.src menu.src progs.src
|
|
||||||
|
|
||||||
|
echo -n "creating zip archive ..."
|
||||||
|
zip -r -9 ../xonotic.zip * > /dev/null
|
||||||
echo "complete"
|
echo "complete"
|
||||||
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
Loading…
Reference in a new issue