diff options
author | Jesusaves <cpntb1@ymail.com> | 2023-07-29 00:16:49 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2023-07-29 00:16:49 -0300 |
commit | 2a86180d63a439a867e4a831d5debbaa5d634862 (patch) | |
tree | 5fe8bae1ba1b4e37a3e672294a58390c892d4f8b | |
parent | 0c504dcdd679b86065496b195451ae1d58d03541 (diff) | |
download | tools-master.tar.gz tools-master.tar.bz2 tools-master.tar.xz tools-master.zip |
-rwxr-xr-x | update/createnew.sh | 21 |
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/ |