blob: 52550215b553811df285a44418525e727b084895 (
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
29
30
31
32
33
34
35
36
37
38
|
#!/usr/bin/env bash
# Copyright (C) 2010-2012 Evol Online
# Author: Andrei Karas (4144)
dir=`pwd`
tmp_path=$PATH
export PATH="$dir:$PATH"
if [[ ! -d "files" ]]; then
mkdir -p files
fi
if [[ ! -d "upload" ]]; then
mkdir -p upload
fi
previous=`cat commit.txt`
cd ../../client-data/mods
FILES=`ls`
for file in $FILES; do
cd $file
find . -type f | xargs zip -9 -r ../../../../evol-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
cp xml_header.txt resources.xml
cat xml_footer.txt >>resources.xml
cp mod-$file.zip ../upload/
cp resources2.txt ../upload/
cp resources.xml ../upload/
done
export PATH="$tmp_path"
|