diff --git a/build/scripts/build_haiku_cd b/build/scripts/build_haiku_cd index 79b8506543..c3a39afbef 100755 --- a/build/scripts/build_haiku_cd +++ b/build/scripts/build_haiku_cd @@ -1,4 +1,5 @@ #!/bin/sh +set -o errexit # The first argument is the shell script that initializes the variables: # sourceDir diff --git a/build/scripts/build_tgz_archive b/build/scripts/build_tgz_archive index 80f74a3c4d..aa36e580d7 100755 --- a/build/scripts/build_tgz_archive +++ b/build/scripts/build_tgz_archive @@ -1,4 +1,5 @@ #!/bin/sh +set -o errexit if [ $# -lt 2 ]; then echo "Usage: $0 ..." @@ -34,7 +35,7 @@ rm=rm # clear output dir $rm -rf $outputDir -$mkdir $outputDir +$mkdir -p $outputDir # populate output dir echo "Preparing contents of archive $archive ..." @@ -47,7 +48,7 @@ done echo "Building archive $archive ..." $rm -f $archive contents=$(cd $outputDir; ls) -tar -C $outputDir --format ustar -czf $archive $contents || exit 1 +tar -C $outputDir --format ustar -czf $archive $contents # clean up $rm -rf $outputDir diff --git a/build/scripts/build_zip_archive b/build/scripts/build_zip_archive index 2b1302e076..e96f27eb7c 100755 --- a/build/scripts/build_zip_archive +++ b/build/scripts/build_zip_archive @@ -1,4 +1,5 @@ #!/bin/sh +set -o errexit if [ $# -lt 2 ]; then echo "Usage: $0 ..." @@ -36,7 +37,7 @@ rm=rm # clear output dir $rmAttrs -rf $outputDir -$mkdir $outputDir +$mkdir -p $outputDir # populate output dir echo "Preparing contents of archive $archive ..." @@ -55,7 +56,7 @@ cd $cwd echo "Building archive $archive ..." $rm -f $archive cd $outputDir -$zip -ryq $archive . || exit 1 +$zip -ryq $archive . cd $cwd # clean up