2022-07-18 16:58:27 +00:00
|
|
|
#!/usr/bin/env bash
|
2022-07-16 17:56:39 +00:00
|
|
|
|
2022-07-18 16:58:27 +00:00
|
|
|
# shellcheck disable=2120
|
2022-07-16 17:56:39 +00:00
|
|
|
function _panic() {
|
|
|
|
local message=$1
|
|
|
|
echo >&2 "$message"
|
|
|
|
exit 1
|
|
|
|
}
|
2022-07-18 16:58:27 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|