We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af23e92 commit fe106c3Copy full SHA for fe106c3
bump-rel/bump-rel
100644
100755
@@ -1,4 +1,4 @@
1
-#!/bin/bash
+#!/usr/bin/bash
2
# A simple script to "bump REL".
3
# Do whatever the fuck you want with this script.
4
#
@@ -18,9 +18,10 @@ unset REL
18
19
# FIXME: does not give two f*cks about duplicate REL=, not pretty, but
20
# practically, nothing can really go wrong - or can it?
21
-if ! $(grep '^REL=' "$1" > /dev/null); then
22
- echo 'REL=1' >> "$1"
+if ! "$(grep -E '^REL=' "$1" >/dev/null)"; then
+ echo 'REL=1' >>"$1"
23
else
24
+ # shellcheck source=/dev/null
25
source "$PWD"/"$1"
26
NEWREL=$(($REL + 1))
27
sed -e "s|REL=.*|REL=$NEWREL|g" -i "$1"
0 commit comments