From c6095ad062eaa0f5576cfab1c4fe436b90c2fbfe Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 10 Apr 2021 00:45:07 -0300 Subject: Add initial tools --- update/addmods.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 update/addmods.sh (limited to 'update/addmods.sh') diff --git a/update/addmods.sh b/update/addmods.sh new file mode 100755 index 0000000..a45f9ed --- /dev/null +++ b/update/addmods.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# Copyright (C) 2010-2012 Evol Online +# Author: Andrei Karas (4144) + +dir=`pwd` +CC=${CC:=gcc} + +rm adler32 +$CC -lz adler32.c -o adler32 + +mkdir files +mkdir upload + +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 " " >> 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 -- cgit v1.2.3-60-g2f50