fixup make-release

This commit is contained in:
Scott B 2020-01-21 03:58:55 -08:00
parent c567d211d5
commit 235e99056f

View file

@ -1,22 +1,16 @@
#!/bin/sh #!/bin/sh
_VERS="v03" _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"; } { echo "can't poll branch, defaulting to master" && _BRANCH="master"; }
# update versions before packing install.sh # update versions before packing install.sh
sed -i \ sed -i -r \
-e "s;(v[[:digit:]][[:digit:]]);($_VERS);" \ -e "s;\(v[[:digit:]][[:digit:]].?\);\($_VERS\);" \
-e "s;nag-buster/.*/;nag-buster/$_BRANCH/;" \ -e "s;(nag-buster/).*(/(pve-nag-buster|install)\.sh);\1$_BRANCH\2;" \
pve-nag-buster.sh install.sh README.md 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 🐶 # TODO there's probably a two liner to handle all of this in awk:
#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
# pack install.sh # pack install.sh
{ {