summaryrefslogtreecommitdiff
path: root/update/addmods.sh
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-04 14:20:31 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-04 14:20:31 -0300
commitca49699d733a7469ded2f48ffeb9183db4ff704c (patch)
treeee1f88df858a6e5020b64799e820a51743ea9530 /update/addmods.sh
parent07b2abb404d5fdc50567cb19ed5633116f575249 (diff)
downloadtools-ca49699d733a7469ded2f48ffeb9183db4ff704c.tar.gz
tools-ca49699d733a7469ded2f48ffeb9183db4ff704c.tar.bz2
tools-ca49699d733a7469ded2f48ffeb9183db4ff704c.tar.xz
tools-ca49699d733a7469ded2f48ffeb9183db4ff704c.zip
r9.0 update
Diffstat (limited to 'update/addmods.sh')
-rwxr-xr-xupdate/addmods.sh15
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/