From 2d40ec3a03f4684f6fabba7dee2981c992a13785 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 1 Apr 2024 15:19:49 -0400 Subject: Rename .bash files to .sh I was already using .sh to refer to shell scripts. When I added .bash, I didn't realize that the linter was set to act on .sh files and not .bash files, so all of these bash scripts escaped the linter. This commit renames them to .sh, removes the .bash extension support from Biz.Namespace, and fixes all the reported shellcheck errors. --- Biz/Ide/version.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 Biz/Ide/version.sh (limited to 'Biz/Ide/version.sh') diff --git a/Biz/Ide/version.sh b/Biz/Ide/version.sh new file mode 100755 index 0000000..60f9c91 --- /dev/null +++ b/Biz/Ide/version.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# +# simple implementation of kelvin versioning +## + ns=$1 + if [[ -e "$1" ]]; then + commits=$(git log --oneline --follow "$ns" | wc -l) + # gold melts at 1337 kelvin, so we start with this + # bc we are forging gold here + version=$(bc -l <<< "1337 - $commits") + echo "$version" + else + echo -1 # signal that file doesn't exist + fi +## -- cgit v1.2.3