From 6efb63db9053dbcb888e64fc5cfb4fa2f0a115a1 Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 10 Feb 2018 17:25:49 +0100 Subject: [PATCH] version 1.0.2 --- clients/bash.sh | 0 scripts/make-release.sh | 23 +++++++++++++++-------- test/run-stress.sh | 0 3 files changed, 15 insertions(+), 8 deletions(-) mode change 100644 => 100755 clients/bash.sh mode change 100644 => 100755 test/run-stress.sh diff --git a/clients/bash.sh b/clients/bash.sh old mode 100644 new mode 100755 diff --git a/scripts/make-release.sh b/scripts/make-release.sh index 0d2ab77..f749ad0 100755 --- a/scripts/make-release.sh +++ b/scripts/make-release.sh @@ -2,6 +2,13 @@ set -e echo +sed=$( which gsed 2>/dev/null || which sed) +find=$(which gfind 2>/dev/null || which find) + +which md5sum 2>/dev/null >/dev/null && + md5sum=md5sum || + md5sum="md5 -r" + ver="$1" [[ "x$ver" == x ]] && @@ -19,7 +26,7 @@ ver="$1" exit 1 } -out_dir="$(pwd | sed -r 's@/[^/]+$@@')" +out_dir="$(pwd | $sed -r 's@/[^/]+$@@')" zip_path="$out_dir/r0c-$ver.zip" tgz_path="$out_dir/r0c-$ver.tar.gz" @@ -36,7 +43,7 @@ tgz_path="$out_dir/r0c-$ver.tar.gz" rm "$zip_path" 2>/dev/null || true rm "$tgz_path" 2>/dev/null || true -#sed -ri "s/^(ADMIN_PWD *= *u).*/\1'hunter2'/" r0c/config.py +#$sed -ri "s/^(ADMIN_PWD *= *u).*/\1'hunter2'/" r0c/config.py tmp="$(mktemp -d)" rls_dir="$tmp/r0c-$ver" @@ -47,8 +54,8 @@ git archive master | tar -x -C "$rls_dir" cd "$rls_dir" -find -type d -exec chmod 755 '{}' \+ -find -type f -exec chmod 644 '{}' \+ +$find -type d -exec chmod 755 '{}' \+ +$find -type f -exec chmod 644 '{}' \+ grep -qE "ADMIN_PWD *= *u'hunter2'" r0c/config.py || { @@ -84,9 +91,9 @@ chmod 755 \ scripts/format-wire-logs.sh \ test/run-stress.sh -find -type f -exec md5sum '{}' \+ | -sed -r 's/(.{32})(.*)/\2\1/' | sort | -sed -r 's/(.*)(.{32})/\2\1/' > ../.sums.md5 +$find -type f -exec $md5sum '{}' \+ | +$sed -r 's/(.{32})(.*)/\2\1/' | sort | +$sed -r 's/(.*)(.{32})/\2\1/' > ../.sums.md5 mv ../.sums.md5 . cd .. @@ -100,5 +107,5 @@ echo " $zip_path" echo " $tgz_path" echo -# function alr() { ls -alR r0c-$1 | sed -r "s/r0c-$1/r0c/" | sed -r 's/[A-Z][a-z]{2} [0-9 ]{2} [0-9]{2}:[0-9]{2}//' > $1; }; for x in master rls src ; do alr $x; done +# function alr() { ls -alR r0c-$1 | $sed -r "s/r0c-$1/r0c/" | $sed -r 's/[A-Z][a-z]{2} [0-9 ]{2} [0-9]{2}:[0-9]{2}//' > $1; }; for x in master rls src ; do alr $x; done diff --git a/test/run-stress.sh b/test/run-stress.sh old mode 100644 new mode 100755