summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xupdate/createnew.sh21
1 files changed, 18 insertions, 3 deletions
diff --git a/update/createnew.sh b/update/createnew.sh
index e4ee61f..309da44 100755
--- a/update/createnew.sh
+++ b/update/createnew.sh
@@ -12,6 +12,8 @@ mkdir files
mkdir upload
rm files/TMW2.zip
+rm files/Audio.zip
+rm files/Maps.zip
echo "\033[1mls -lh ../..\033[0m"
ls -lh ../..
echo "\033[1mcd ../../clientdata\033[0m"
@@ -19,13 +21,13 @@ cd ../../clientdata
echo "\033[1mGenerating zip file...\033[0m"
ls -lh ../..
find -iregex ".+[.]\(xml\|png\|jpg\|tmx\|ogg\|txt\|po\|tsx\)" -exec touch --date=2015-01-01 {} \;
-find -iregex ".+[.]\(xml\|png\|jpg\|tmx\|ogg\|txt\|po\|tsx\)" -printf "%P\n" | zip -X -@ $dir/files/TMW2.zip
+find -iregex ".+[.]\(xml\|png\|jpg\)" -printf "%P\n" | zip -X -@ $dir/files/TMW2.zip
+find -iregex ".+[.]\(ogg\|txt\)" -printf "%P\n" | zip -X -@ $dir/files/Audio.zip
+find -iregex ".+[.]\(tmx\|tsx\|po\)" -printf "%P\n" | zip -X -@ $dir/files/Maps.zip
git log --pretty=oneline -n 1 | awk '{print $1}' > $dir/commit.txt
echo "\033[1mcd $dir/files\033[0m"
cd $dir/files
-sum=`adler32 TMW2.zip | awk '{print $2}'`
-echo "TMW2.zip ${sum}" >resources2.txt
echo "\033[1mGenerating XMLs\033[0m"
echo '<?xml version="1.0"?>
@@ -33,7 +35,18 @@ echo '<?xml version="1.0"?>
touch xml_footer.txt
touch xml_mods.txt
+sum=`adler32 TMW2.zip | awk '{print $2}'`
+echo "TMW2.zip ${sum}" >resources2.txt
echo " <update type=\"data\" file=\"TMW2.zip\" hash=\"${sum}\" />" >> xml_header.txt
+
+sum=`adler32 Maps.zip | awk '{print $2}'`
+echo "Maps.zip ${sum}" >resources2.txt
+echo " <update type=\"data\" file=\"Maps.zip\" hash=\"${sum}\" />" >> xml_header.txt
+
+sum=`adler32 Audio.zip | awk '{print $2}'`
+echo "Audio.zip ${sum}" >resources2.txt
+echo " <update type=\"data\" file=\"Audio.zip\" hash=\"${sum}\" />" >> xml_header.txt
+
cp xml_header.txt resources.xml
cat xml_footer.txt >>resources.xml
cat xml_mods.txt >>resources.xml
@@ -41,6 +54,8 @@ echo '</updates>' >>resources.xml
echo "\033[1mPublishing changes...\033[0m"
cp TMW2.zip ../upload/
+cp Maps.zip ../upload/
+cp Audio.zip ../upload/
cp resources2.txt ../upload/
cp resources.xml ../upload/
cp ../news.txt ../upload/