summaryrefslogtreecommitdiff
path: root/update/addmods.sh
diff options
context:
space:
mode:
Diffstat (limited to 'update/addmods.sh')
-rwxr-xr-xupdate/addmods.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/update/addmods.sh b/update/addmods.sh
index a45f9ed..5255021 100755
--- a/update/addmods.sh
+++ b/update/addmods.sh
@@ -4,13 +4,17 @@
# Author: Andrei Karas (4144)
dir=`pwd`
-CC=${CC:=gcc}
+tmp_path=$PATH
-rm adler32
-$CC -lz adler32.c -o adler32
+export PATH="$dir:$PATH"
-mkdir files
-mkdir upload
+if [[ ! -d "files" ]]; then
+ mkdir -p files
+fi
+
+if [[ ! -d "upload" ]]; then
+ mkdir -p upload
+fi
previous=`cat commit.txt`
@@ -22,7 +26,7 @@ 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`
+ 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
@@ -30,3 +34,5 @@ for file in $FILES; do
cp resources2.txt ../upload/
cp resources.xml ../upload/
done
+
+export PATH="$tmp_path" \ No newline at end of file