summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorSorin Sbarnea <ssbarnea@redhat.com>2019-12-04 16:23:32 +0000
committerSorin Sbarnea <ssbarnea@redhat.com>2019-12-04 16:23:55 +0000
commit9db92d540aeb2a13681d4ee4c1f43a5efde9755f (patch)
tree8c6073c36e812b4c754bf3b771dd11461aa55023 /hack
parente47b7a61d925475faea32a130296cd6a4d660af0 (diff)
downloadpodman-9db92d540aeb2a13681d4ee4c1f43a5efde9755f.tar.gz
podman-9db92d540aeb2a13681d4ee4c1f43a5efde9755f.tar.bz2
podman-9db92d540aeb2a13681d4ee4c1f43a5efde9755f.zip
Improve hack/get_release_info.sh
- Adopt bash strict mode - Avoid cd errors as seen on CI vendor jobs: hack/get_release_info.sh: line 9: cd: /go/src/github.com/containers/libpod: No such file or directory Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
Diffstat (limited to 'hack')
-rwxr-xr-xhack/get_release_info.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/hack/get_release_info.sh b/hack/get_release_info.sh
index b75751170..c2be6a270 100755
--- a/hack/get_release_info.sh
+++ b/hack/get_release_info.sh
@@ -4,9 +4,10 @@
# a script allows uniform behavior across multiple environments and
# distributions. The script expects a single argument, as reflected below.
-set -e
+set -euo pipefail
-cd "${GOSRC:-$(dirname $0)/../}"
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+cd "${GOSRC:-${DIR}/../}"
valid_args() {
REGEX='^\s+[[:upper:]]+\*[)]'