From dc474890da944e15e3b90bc58ed5f77e28c26447 Mon Sep 17 00:00:00 2001 From: xtex Date: Sun, 13 Oct 2024 15:52:30 +0800 Subject: [PATCH] bump-rel: set executable --- bump-rel/bump-rel | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 bump-rel/bump-rel diff --git a/bump-rel/bump-rel b/bump-rel/bump-rel old mode 100644 new mode 100755 index 79881b6..cd1a570 --- a/bump-rel/bump-rel +++ b/bump-rel/bump-rel @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/bash # A simple script to "bump REL". # Do whatever the fuck you want with this script. # @@ -18,9 +18,10 @@ unset REL # # FIXME: does not give two f*cks about duplicate REL=, not pretty, but # practically, nothing can really go wrong - or can it? -if ! $(grep '^REL=' "$1" > /dev/null); then - echo 'REL=1' >> "$1" +if ! grep -E '^REL=' "$1" >/dev/null; then + echo 'REL=1' >>"$1" else + # shellcheck source=/dev/null source "$PWD"/"$1" NEWREL=$(($REL + 1)) sed -e "s|REL=.*|REL=$NEWREL|g" -i "$1"