blob: 9e3f4dbdd0ee38821a57a4f3b95b9b8dbb7037aa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/env bash
# Copyright (C) 2010-2012 TMW2 Online
# Author: Andrei Karas (4144)
dir=`pwd`
previous=`cat commit.txt`
rm files/xml_mods.txt
cd ../../client-data/mods
FILES=`ls`
for file in $FILES; do
cd $file
find . -type f | xargs zip -9 -r ../../../tools/update/files/mod-$file.zip
cd $dir/files
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/
done
|