summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhackademix2018-10-12 22:34:42 +0200
committerhackademix2018-10-12 22:34:42 +0200
commit9228798daa13086075907772e424892a9744f3d5 (patch)
tree42e200a3213eea52967a34bae60ab6a3db581304
parent8c37d74a19b7c90d02282df91d36a1197def943b (diff)
downloadnoscript-9228798daa13086075907772e424892a9744f3d5.tar.gz
noscript-9228798daa13086075907772e424892a9744f3d5.tar.xz
noscript-9228798daa13086075907772e424892a9744f3d5.zip
[Build] Consinstently remove backups after in place Perl editing.
-rw-r--r--build.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 4133825..6041789 100644
--- a/build.sh
+++ b/build.sh
@@ -12,7 +12,8 @@ if [ "$1" == "tag" ]; then
exit 0
fi
if [ "$1" == "rel" ]; then
- perl -pi -e 's/("version":.*)rc\d+/$1/' "$MANIFEST_IN" && rm "$MANIFEST_IN".bak
+ perl -pi.bak -e 's/("version":.*)rc\d+/$1/' "$MANIFEST_IN"
+ rm -f "$MANIFEST_IN".bak
"$0" && "$0" bump
exit
fi
@@ -32,7 +33,8 @@ if [ "$1" == "bump" ]; then
pattern='\b\d+'
fi
REPLACE_EXPR='s/(?<PREAMBLE>"version":.*)'"$pattern"'"/$+{PREAMBLE}'"$NEW_VER"'"/'
- perl -pi -e $REPLACE_EXPR "$MANIFEST_IN" && rm "$MANIFEST_IN".bak && "$0" bump
+ perl -pi.bak -e $REPLACE_EXPR "$MANIFEST_IN" && "$0" bump
+ rm -f "$MANIFEST_IN".bak
exit
fi
echo "Bumping to $VER"