summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-24 12:03:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-24 12:03:46 +0300
commita0a9df160d72c0401653df2b7476ab7b57ee4b9a (patch)
treecc9a0f0604de06e02ee555d1d41575253a11ab30
parentd69559cd34637ef2d88a57d53314c795a7d74d3a (diff)
downloadevol-tools-a0a9df160d72c0401653df2b7476ab7b57ee4b9a.tar.gz
evol-tools-a0a9df160d72c0401653df2b7476ab7b57ee4b9a.tar.bz2
evol-tools-a0a9df160d72c0401653df2b7476ab7b57ee4b9a.tar.xz
evol-tools-a0a9df160d72c0401653df2b7476ab7b57ee4b9a.zip
upate: add missing addmods.sh
-rwxr-xr-xupdate/addmods.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/update/addmods.sh b/update/addmods.sh
new file mode 100755
index 0000000..0711ba5
--- /dev/null
+++ b/update/addmods.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# Copyright (C) 2010-2012 Evol Online
+# Author: Andrei Karas (4144)
+
+dir=`pwd`
+
+rm adler32
+gcc -lz adler32.c -o adler32
+
+mkdir files
+mkdir upload
+
+previous=`cat commit.txt`
+
+cd ../../gittorious/clientdata-beta/mods
+
+FILES=`ls`
+
+for file in $FILES; do
+ cd $file
+ find . -type f | xargs zip -9 -r ../../../../privtools/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