From b3cd9a5dd68c8a973795931149a254563bda2865 Mon Sep 17 00:00:00 2001 From: jak1 Date: Sat, 18 Jun 2022 21:37:28 +0200 Subject: ported adler32 to py3, updated bash update scripts --- update/update_music.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'update/update_music.sh') 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 " " >> 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 -- cgit v1.2.3-70-g09d2