diff options
author | Thomas Buckley-Houston <tom@tombh.co.uk> | 2022-07-18 12:58:27 -0400 |
---|---|---|
committer | Thomas Buckley-Houston <tom@tombh.co.uk> | 2022-07-20 15:22:12 -0400 |
commit | 3bc427f416da83ffec9face07adf2cbc7c2aaecb (patch) | |
tree | 6d62dda35322b3efef5fd743544adf39bf0366b0 /scripts/common.bash | |
parent | 87bf16dd20395c58a8089d860696b4341f47fa0e (diff) |
devops: Update release process for Githubv1.8.0
Diffstat (limited to 'scripts/common.bash')
-rw-r--r-- | scripts/common.bash | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/common.bash b/scripts/common.bash index 20bcb04..cfa04c9 100644 --- a/scripts/common.bash +++ b/scripts/common.bash @@ -1,7 +1,23 @@ -#!/bin/env bash +#!/usr/bin/env bash +# shellcheck disable=2120 function _panic() { local message=$1 echo >&2 "$message" exit 1 } + +function _md5() { + local path=$1 + md5sum "$path" | cut -d' ' -f1 +} + +function pushd() { + # shellcheck disable=2119 + command pushd "$@" >/dev/null || _panic +} + +function popd() { + # shellcheck disable=2119 + command popd "$@" >/dev/null || _panic +} |