From 1e44ae0e198b0bc3c4363774a27a3e72a5c2a47b Mon Sep 17 00:00:00 2001 From: practicalswift Date: Wed, 4 Oct 2017 21:19:45 +0200 Subject: Add error handling: exit if cd fails --- share/genbuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share/genbuild.sh') diff --git a/share/genbuild.sh b/share/genbuild.sh index 32ef2a5755..419e0da0fd 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -4,7 +4,7 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. if [ $# -gt 1 ]; then - cd "$2" + cd "$2" || exit 1 fi if [ $# -gt 0 ]; then FILE="$1" -- cgit v1.2.3