summaryrefslogtreecommitdiff
path: root/update
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-12 00:47:43 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-12 00:47:43 -0300
commitfe040b3891be6910a04f79405bccfb225123df51 (patch)
tree217ae70a857b273b00abec121ade39041617298c /update
parent5853f807ce923994ac7b049adbcb1bdde0684484 (diff)
downloadtools-fe040b3891be6910a04f79405bccfb225123df51.tar.gz
tools-fe040b3891be6910a04f79405bccfb225123df51.tar.bz2
tools-fe040b3891be6910a04f79405bccfb225123df51.tar.xz
tools-fe040b3891be6910a04f79405bccfb225123df51.zip
Fix bug in addmods.sh
Diffstat (limited to 'update')
-rwxr-xr-xupdate/addmods.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/update/addmods.sh b/update/addmods.sh
index 9e3f4db..ea1f644 100755
--- a/update/addmods.sh
+++ b/update/addmods.sh
@@ -4,25 +4,32 @@
# Author: Andrei Karas (4144)
dir=`pwd`
+mds='../../client-data/mods'
previous=`cat commit.txt`
rm files/xml_mods.txt
+rm files/mod-*
cd ../../client-data/mods
FILES=`ls`
for file in $FILES; do
+ echo "Uploading $file mod...."
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
+ echo " <mod type=\"data\" group=\"$file\" file=\"mod-$file.zip\" hash=\"${sum}\" />" >> xml_mods.txt
cp mod-$file.zip ../upload/
- cp resources2.txt ../upload/
- cp resources.xml ../upload/
+ cd ../$mds
done
+
+cd $dir/files
+cp xml_header.txt resources.xml
+cat xml_footer.txt >>resources.xml
+cat xml_mods.txt >>resources.xml
+echo '</updates>' >>resources.xml
+cp resources2.txt ../upload/
+cp resources.xml ../upload/
+