summaryrefslogtreecommitdiff
path: root/update/update_music.sh
diff options
context:
space:
mode:
authorjak1 <jak1@themanaworld.org>2022-06-18 21:37:28 +0200
committerjak1 <jak1@themanaworld.org>2022-06-18 21:37:28 +0200
commitb3cd9a5dd68c8a973795931149a254563bda2865 (patch)
tree2110f496a061997fbf120f6ac7e82ff28f7b556e /update/update_music.sh
parent6c2ad98dfd4a2d6e39423c5b4f1e7828fd79566a (diff)
downloadtools-b3cd9a5dd68c8a973795931149a254563bda2865.tar.gz
tools-b3cd9a5dd68c8a973795931149a254563bda2865.tar.bz2
tools-b3cd9a5dd68c8a973795931149a254563bda2865.tar.xz
tools-b3cd9a5dd68c8a973795931149a254563bda2865.zip
ported adler32 to py3, updated bash update scripts
Diffstat (limited to 'update/update_music.sh')
-rwxr-xr-xupdate/update_music.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/update/update_music.sh b/update/update_music.sh
index 7954b45..57e688e 100755
--- a/update/update_music.sh
+++ b/update/update_music.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 musiccommit.txt`
@@ -28,7 +32,7 @@ cd $dir/files
if [ -f evol-${u1}..${u2}.zip ]; then
mv ../muciscommit.txt ../muciscommit_old.txt
echo ${head} >../muciscommit.txt
- sum=`../adler32 1 music-${u1}..${u2}.zip`
+ sum=`adler32 1 music-${u1}..${u2}.zip`
echo " <update type=\"music\" required=\"no\" file=\"music-${u1}..${u2}.zip\" hash=\"${sum}\" description=\"TMW music\" />" >> xml_header.txt
cp xml_header.txt resources.xml
cat xml_footer.txt >>resources.xml
@@ -38,3 +42,5 @@ if [ -f evol-${u1}..${u2}.zip ]; then
cp resources.xml ../upload/
cp ../news.txt ../upload
fi
+
+export PATH="$tmp_path" \ No newline at end of file