Skip to content

Commit

Permalink
bump-rel: set executable
Browse files Browse the repository at this point in the history
  • Loading branch information
xtexChooser committed Oct 13, 2024
1 parent af23e92 commit fe106c3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bump-rel/bump-rel
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/bash
# A simple script to "bump REL".
# Do whatever the fuck you want with this script.
#
Expand All @@ -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"
Expand Down

0 comments on commit fe106c3

Please sign in to comment.