From 63f532a5bf69ad832041baaa7626312c93139db6 Mon Sep 17 00:00:00 2001 From: "Wilson J. Holmes" Date: Fri, 4 Oct 2024 22:38:13 -0400 Subject: [PATCH 1/3] Update build.sh to abort on shell errors (`bash -e`) --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 3ff3e5b516..909150f887 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # # KLayout Layout Viewer From a89a9b610a225cf18181e7388a2f777174910791 Mon Sep 17 00:00:00 2001 From: "Wilson J. Holmes" Date: Fri, 4 Oct 2024 22:41:37 -0400 Subject: [PATCH 2/3] Update method of getting absolute paths to error out if they do not exist --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 909150f887..117b702a83 100755 --- a/build.sh +++ b/build.sh @@ -597,8 +597,8 @@ mkdir -p $BUILD # qmake needs absolute paths, so we get them now: # OSX does not have `readlink -f` command. Use equivalent Perl script. if [ "$IS_MAC" = "no" ]; then - BUILD=`readlink -f $BUILD` - BIN=`readlink -f $BIN` + BUILD=`realpath --canonicalize-existing $BUILD` + BIN=`realpath --canonicalize-existing $BIN` else BUILD=`perl -MCwd -le 'print Cwd::abs_path(shift)' $BUILD` BIN=`perl -MCwd -le 'print Cwd::abs_path(shift)' $BIN` From 686c6abd2b5c9bbdcc932cdb5b358b9d5a351917 Mon Sep 17 00:00:00 2001 From: "Wilson J. Holmes" Date: Fri, 4 Oct 2024 22:43:57 -0400 Subject: [PATCH 3/3] Update comment to match implementation in build.sh: `realpath --canonicalize-existing` --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 117b702a83..6622d5f92d 100755 --- a/build.sh +++ b/build.sh @@ -595,7 +595,7 @@ mkdir -p $BUILD . $(dirname $(which $0))/version.sh # qmake needs absolute paths, so we get them now: -# OSX does not have `readlink -f` command. Use equivalent Perl script. +# OSX does not have `realpath --canonicalize-existing` command. Use equivalent Perl script. if [ "$IS_MAC" = "no" ]; then BUILD=`realpath --canonicalize-existing $BUILD` BIN=`realpath --canonicalize-existing $BIN`