packaging script update
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7623 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -17,7 +17,7 @@ SAVETARBALLPATH=~/AssaultCube
|
||||
# This will be the directory that gets packaged:
|
||||
PATHTOACDIR=~/AssaultCube/SVN_Trunk
|
||||
ABSOLUTEPATHTODOCS=~/AssaultCube/SVN_Website/htdocs/docs
|
||||
NEWACVERSION=1.2.0.0
|
||||
NEWACVERSION=1.2.0.1
|
||||
|
||||
|
||||
|
||||
@@ -25,31 +25,31 @@ NEWACVERSION=1.2.0.0
|
||||
ACDIRFOLDERNAME=`basename $PATHTOACDIR`
|
||||
|
||||
# Start of the script, so remind the user of things we can't check:
|
||||
echo -e "\033[1mDid you update to head, both the packaging directory and the docs directory?\033[0m\a"
|
||||
echo "\033[1mDid you update to head, both the packaging directory and the docs directory?\033[0m\a"
|
||||
echo " * If so, press ENTER to continue, otherwise press ctrl+c to exit."
|
||||
read
|
||||
echo -e "\033[1mIf required, did you patch the source with any relevant materials?\033[0m\a"
|
||||
read DUMMYRD
|
||||
echo "\033[1mIf required, did you patch the source with any relevant materials?\033[0m\a"
|
||||
echo " * Press ENTER to continue, otherwise press ctrl+c to exit."
|
||||
read
|
||||
echo -e "\033[1mDid you strip symbols when compiling?\033[0m\a"
|
||||
read DUMMYRD
|
||||
echo "\033[1mDid you strip symbols when compiling?\033[0m\a"
|
||||
echo " * If so, press ENTER to continue, otherwise press ctrl+c to exit."
|
||||
read
|
||||
echo -e "\033[1mHave you checked all 4 variables in this script are set correctly?\033[0m"
|
||||
echo -e " * The packages created by this script will be saved to this folder:\n\E[31m $SAVETARBALLPATH \E[0m"
|
||||
echo -e " * The absolute-path to your AssaultCube directory is set as:\n\E[31m $PATHTOACDIR \E[0m"
|
||||
echo -e " * The absolute-path to your AssaultCube \"docs\" directory is set as:\n\E[31m $ABSOLUTEPATHTODOCS \E[0m"
|
||||
echo -e " * Your new AssaultCube version will become:\n\E[31m $NEWACVERSION \E[0m\n"
|
||||
echo -e "\033[1mIf these are correct, press ENTER to continue, otherwise press ctrl+c to exit.\033[0m\a"
|
||||
read
|
||||
read DUMMYRD
|
||||
echo "\033[1mHave you checked all 4 variables in this script are set correctly?\033[0m"
|
||||
echo " * The packages created by this script will be saved to this folder:\n $SAVETARBALLPATH"
|
||||
echo " * The absolute-path to your AssaultCube directory is set as:\n $PATHTOACDIR"
|
||||
echo " * The absolute-path to your AssaultCube \"docs\" directory is set as:\n $ABSOLUTEPATHTODOCS"
|
||||
echo " * Your new AssaultCube version will become:\n $NEWACVERSION\n"
|
||||
echo "\033[1mIf these are correct, press ENTER to continue, otherwise press ctrl+c to exit.\033[0m\a"
|
||||
read DUMMYRD
|
||||
|
||||
# Still at the start of the script, so find user-errors that we can check:
|
||||
# Checking "$ABSOLUTEPATHTODOCS" is set correctly...
|
||||
if [ -e $ABSOLUTEPATHTODOCS/reference.xml ]; then
|
||||
echo "Stated path to AssaultCube's documentation contains \"reference.xml\""
|
||||
echo "Hopefully this means the path is correct and contained files are good."
|
||||
echo -e "Proceeding to the next step...\n"
|
||||
echo "Proceeding to the next step...\n"
|
||||
else
|
||||
echo -e "\a\E[31m\033[1mERROR:\E[0m \"reference.xml\" did NOT exist at the ABSOLUTEPATHTODOCS alias."
|
||||
echo "\a\033[1mERROR:\033[0m \"reference.xml\" did NOT exist at the ABSOLUTEPATHTODOCS alias."
|
||||
echo "Open this shell file and modify that alias to fix it."
|
||||
exit
|
||||
fi
|
||||
@@ -58,9 +58,9 @@ fi
|
||||
if [ -e $PATHTOACDIR/source/src/main.cpp ]; then
|
||||
echo "Stated path to AssaultCube contains \"source/src/main.cpp\""
|
||||
echo "Hopefully this means the path is correct and contained files are good."
|
||||
echo -e "Proceeding to the next step...\n"
|
||||
echo "Proceeding to the next step...\n"
|
||||
else
|
||||
echo -e "\a\E[31m\033[1mERROR:\E[0m \"source/src/main.cpp\" did NOT exist at the PATHTOACDIR alias."
|
||||
echo "\a\033[1mERROR:\033[0m \"source/src/main.cpp\" did NOT exist at the PATHTOACDIR alias."
|
||||
echo "Open this shell file and modify that alias to fix it."
|
||||
exit
|
||||
fi
|
||||
@@ -69,9 +69,9 @@ fi
|
||||
BINARYFILES=`cd $PATHTOACDIR/bin_unix && find ./linux_* -mtime 0 | sort | xargs`
|
||||
if [ "$BINARYFILES" = "./linux_64_client ./linux_64_server ./linux_client ./linux_server" ]; then
|
||||
echo "All binaries have been compiled in the last 24 hours. Hopefully this means they're up to date!"
|
||||
echo -e "Proceeding to the next step...\n"
|
||||
echo "Proceeding to the next step...\n"
|
||||
else
|
||||
echo -e "\a\E[31m\033[1mERROR:\E[0m Timestamps on binary files are older than 24 hours."
|
||||
echo "\a\033[1mERROR:\033[0m Timestamps on binary files are older than 24 hours."
|
||||
echo "Please go compile new 32/64 bit binaries."
|
||||
exit
|
||||
fi
|
||||
@@ -82,9 +82,9 @@ MAPSCGZ=`cd $MAPSPATH && find ./*.cgz | xargs -i basename {} .cgz | sort -u | xa
|
||||
MAPSJPG=`cd $MAPSPATH/preview && find ./*.jpg | xargs -i basename {} .jpg | sort -u | xargs`
|
||||
if [ "$MAPSCGZ" = "$MAPSJPG" ]; then
|
||||
echo "All map \"previews\" are available!"
|
||||
echo -e "Proceeding to the next step...\n"
|
||||
echo "Proceeding to the next step...\n"
|
||||
else
|
||||
echo -e "\a\E[31m\033[1mERROR:\E[0m Some map previews are missing."
|
||||
echo "\a\033[1mERROR:\033[0m Some map previews are missing."
|
||||
echo "Please go to $MAPSPATH/preview and create the ones that are missing!"
|
||||
exit
|
||||
fi
|
||||
@@ -94,9 +94,9 @@ MAPSCGZ2=`cd $MAPSPATH && find ./*.cgz | xargs -i basename {} .cgz | sort -u | x
|
||||
MAPSBOTS=`cd $PATHTOACDIR/bot/waypoints && find ./*.wpt | xargs -i basename {} .wpt | sort -u | xargs`
|
||||
if [ "$MAPSBOTS" = "$MAPSCGZ2" ]; then
|
||||
echo "All bot waypoints are available!"
|
||||
echo -e "Proceeding to the next step...\n"
|
||||
echo "Proceeding to the next step...\n"
|
||||
else
|
||||
echo -e "\a\E[31m\033[1mERROR:\E[0m Some bot waypoints are missing."
|
||||
echo "\a\033[1mERROR:\033[0m Some bot waypoints are missing."
|
||||
echo "Please go generate the ones that are missing!"
|
||||
exit
|
||||
fi
|
||||
@@ -104,30 +104,29 @@ fi
|
||||
# Check that shadows.dat files exist. To grab a list of shadows.dat files:
|
||||
# cd ./packages/models && find . -name "shadows.dat" | sort
|
||||
cd $PATHTOACDIR/packages/models/
|
||||
if [[ -e ./misc/gib01/shadows.dat \
|
||||
&& -e ./misc/gib02/shadows.dat \
|
||||
&& -e ./misc/gib03/shadows.dat \
|
||||
&& -e ./pickups/akimbo/shadows.dat \
|
||||
&& -e ./pickups/ammobox/shadows.dat \
|
||||
&& -e ./pickups/health/shadows.dat \
|
||||
&& -e ./pickups/helmet/shadows.dat \
|
||||
&& -e ./pickups/kevlar/shadows.dat \
|
||||
&& -e ./pickups/nade/shadows.dat \
|
||||
&& -e ./pickups/pistolclips/shadows.dat \
|
||||
&& -e ./playermodels/shadows.dat \
|
||||
&& -e ./weapons/assault/world/shadows.dat \
|
||||
&& -e ./weapons/carbine/world/shadows.dat \
|
||||
&& -e ./weapons/grenade/world/shadows.dat \
|
||||
&& -e ./weapons/grenade/static/shadows.dat \
|
||||
&& -e ./weapons/knife/world/shadows.dat \
|
||||
&& -e ./weapons/pistol/world/shadows.dat \
|
||||
&& -e ./weapons/shotgun/world/shadows.dat \
|
||||
&& -e ./weapons/sniper/world/shadows.dat \
|
||||
&& -e ./weapons/subgun/world/shadows.dat ]]; then
|
||||
if [ -e ./misc/gib02/shadows.dat ] \
|
||||
&& [ -e ./misc/gib03/shadows.dat ] \
|
||||
&& [ -e ./pickups/akimbo/shadows.dat ] \
|
||||
&& [ -e ./pickups/ammobox/shadows.dat ] \
|
||||
&& [ -e ./pickups/health/shadows.dat ] \
|
||||
&& [ -e ./pickups/helmet/shadows.dat ] \
|
||||
&& [ -e ./pickups/kevlar/shadows.dat ] \
|
||||
&& [ -e ./pickups/nade/shadows.dat ] \
|
||||
&& [ -e ./pickups/pistolclips/shadows.dat ] \
|
||||
&& [ -e ./playermodels/shadows.dat ] \
|
||||
&& [ -e ./weapons/assault/world/shadows.dat ] \
|
||||
&& [ -e ./weapons/carbine/world/shadows.dat ] \
|
||||
&& [ -e ./weapons/grenade/static/shadows.dat ] \
|
||||
&& [ -e ./weapons/grenade/world/shadows.dat ] \
|
||||
&& [ -e ./weapons/knife/world/shadows.dat ] \
|
||||
&& [ -e ./weapons/pistol/world/shadows.dat ] \
|
||||
&& [ -e ./weapons/shotgun/world/shadows.dat ] \
|
||||
&& [ -e ./weapons/sniper/world/shadows.dat ] \
|
||||
&& [ -e ./weapons/subgun/world/shadows.dat ]; then
|
||||
echo "All known shadows.dat files exist."
|
||||
echo -e "Proceeding to the next step...\n"
|
||||
echo "Proceeding to the next step...\n"
|
||||
else
|
||||
echo -e "\a\E[31m\033[1mERROR:\E[0m Some shadows.dat files are missing."
|
||||
echo "\a\033[1mERROR:\033[0m Some shadows.dat files are missing."
|
||||
echo "Please run AssaultCube to generate these files."
|
||||
exit
|
||||
fi
|
||||
@@ -135,7 +134,7 @@ fi
|
||||
# Clean out crufty files:
|
||||
echo "Please wait: Cleaning out some crufty files..."
|
||||
cd $PATHTOACDIR/source/enet && make distclean
|
||||
cd ../src && make clean
|
||||
cd ../src && make clean
|
||||
cd ../../config && rm -f init.cfg killmessages.cfg saved.cfg servers.cfg
|
||||
cd .. && rm -f `(find ./demos/* -type f | grep -v "tutorial_demo.dmo")`
|
||||
rm -f ./bin_unix/native_*
|
||||
@@ -147,11 +146,11 @@ echo "Copied documentation into the main folder..."
|
||||
cd $PATHTOACDIR && cp $ABSOLUTEPATHTODOCS/* $PATHTOACDIR/docs/ -R
|
||||
|
||||
# Show us modified files:
|
||||
echo -e "\nPlease wait: Checking if any \"extra\" crufty files exist..."
|
||||
echo "\nPlease wait: Checking if any \"extra\" crufty files exist..."
|
||||
cd $PATHTOACDIR && svn status
|
||||
echo -e "\n\033[1mThe above is a list of modified/extra files/folders.\033[0m\a"
|
||||
echo "\n\033[1mThe above is a list of modified/extra files/folders.\033[0m\a"
|
||||
echo " * If everything is OK, press ENTER to continue. Otherwise press ctrl+c to exit."
|
||||
read
|
||||
read DUMMYRD
|
||||
|
||||
# Set up ./config/docs.cfg - just in-case:
|
||||
echo "... Generating ./config/docs.cfg"
|
||||
@@ -166,7 +165,7 @@ find ./packages/maps/official/*.cgz | \
|
||||
sort -u >> ./config/securemaps.cfg
|
||||
|
||||
# Create the linux tarball:
|
||||
echo -e "\n... Creating the Linux tarball..."
|
||||
echo "\n... Creating the Linux tarball..."
|
||||
cd .. && mv $ACDIRFOLDERNAME AssaultCube_v$NEWACVERSION
|
||||
tar cjvf $SAVETARBALLPATH/AssaultCube_v$NEWACVERSION.tar.bz2 \
|
||||
--exclude=*.bat --exclude=*bin_win32* \
|
||||
@@ -178,7 +177,7 @@ tar cjvf $SAVETARBALLPATH/AssaultCube_v$NEWACVERSION.tar.bz2 \
|
||||
AssaultCube_v$NEWACVERSION/
|
||||
|
||||
# Create the source tarball:
|
||||
echo -e "\n... Creating the Source tarball..."
|
||||
echo "\n... Creating the Source tarball..."
|
||||
mv AssaultCube_v$NEWACVERSION/ AssaultCube_v$NEWACVERSION.source/
|
||||
tar cjvf $SAVETARBALLPATH/AssaultCube_v$NEWACVERSION.source.tar.bz2 \
|
||||
--exclude-vcs \
|
||||
@@ -186,7 +185,7 @@ tar cjvf $SAVETARBALLPATH/AssaultCube_v$NEWACVERSION.source.tar.bz2 \
|
||||
mv AssaultCube_v$NEWACVERSION.source/ $ACDIRFOLDERNAME/
|
||||
|
||||
# Clean up:
|
||||
rm -Rf $PATHTOACDIR/docs/* && echo -e "\n... Deleted all files in ./docs..."
|
||||
rm -Rf $PATHTOACDIR/docs/* && echo "\n... Deleted all files in ./docs..."
|
||||
cd $PATHTOACDIR/packages/models && rm -f `(find . -type f -name "shadows.dat")`
|
||||
echo "... Deleted shadows.dat files. Packaging finished!"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user