diff options
Diffstat (limited to 'update/addmods.sh')
-rwxr-xr-x | update/addmods.sh | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/update/addmods.sh b/update/addmods.sh index 6d6f146..9e3f4db 100755 --- a/update/addmods.sh +++ b/update/addmods.sh @@ -5,13 +5,8 @@ dir=`pwd` -rm adler32 -gcc -lz adler32.c -o adler32 - -mkdir files -mkdir upload - previous=`cat commit.txt` +rm files/xml_mods.txt cd ../../client-data/mods @@ -19,12 +14,14 @@ FILES=`ls` for file in $FILES; do cd $file - find . -type f | xargs zip -9 -r ../../../../TMW2-tools/update/files/mod-$file.zip + find . -type f | xargs zip -9 -r ../../../tools/update/files/mod-$file.zip cd $dir/files - sum=`adler32 1 mod-$file.zip` - echo " <update type=\"data\" group=\"$file\" file=\"mod-$file.zip\" hash=\"${sum}\" />" >> xml_header.txt + sum=`adler32 mod-$file.zip | awk '{print $2}'` + echo " <update type=\"data\" file=\"mod-$file.zip\" hash=\"${sum}\" />" >> xml_mods.txt cp xml_header.txt resources.xml cat xml_footer.txt >>resources.xml + cat xml_mods.txt >>resources.xml + echo '</updates>' >>resources.xml cp mod-$file.zip ../upload/ cp resources2.txt ../upload/ cp resources.xml ../upload/ |