From 235e99056f220f71fbbc3367974e5d8f7b6e76c1 Mon Sep 17 00:00:00 2001 From: Scott B <28817345+foundObjects@users.noreply.github.com> Date: Tue, 21 Jan 2020 03:58:55 -0800 Subject: [PATCH] fixup make-release --- make-release.sh | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/make-release.sh b/make-release.sh index 49c71b1..d552dd1 100755 --- a/make-release.sh +++ b/make-release.sh @@ -1,22 +1,16 @@ #!/bin/sh _VERS="v03" -_BRANCH=$(git branch --show-current) || +_BRANCH=$(git branch --show-current) >/dev/null 2>&1 || { echo "can't poll branch, defaulting to master" && _BRANCH="master"; } # update versions before packing install.sh -sed -i \ - -e "s;(v[[:digit:]][[:digit:]]);($_VERS);" \ - -e "s;nag-buster/.*/;nag-buster/$_BRANCH/;" \ +sed -i -r \ + -e "s;\(v[[:digit:]][[:digit:]].?\);\($_VERS\);" \ + -e "s;(nag-buster/).*(/(pve-nag-buster|install)\.sh);\1$_BRANCH\2;" \ pve-nag-buster.sh install.sh README.md -#sed -i -e "s/([v[[:digit:]][[:digit:]])/($_VERS)/" pve-nag-buster.sh install.sh -#sed -i -e "s;nag-buster/.*/;nag-buster/$_BRANCH/;" install.sh README.md -# I have no idea what I'm doing 🐶 -#awk 'FNR==NR{s=(!s)?$0:s RS $0;next} /__BASE64__/{sub(/__BASE64__/, s)} 1' \ -# <(xz -z -9 -c pve-nag-buster.sh | base64) src/install > install.sh - -# TODO: there's probably a two liner to handle all of this in awk +# TODO there's probably a two liner to handle all of this in awk: # pack install.sh {