diff options
author | P. J. McDermott <pjm@nac.net> | 2012-02-16 11:42:26 (EST) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-02-16 11:42:26 (EST) |
commit | 57cea5f4e37e38f256c598c63d002f4f1d68ee3d (patch) | |
tree | 9204e621ea28d29dfa0c5bd98d6f4a5b75f4858c | |
parent | 5c0d73506427282cb01ae5e43909a94a8c8868ed (diff) |
Make oh-installfiles exit on error.
-rw-r--r-- | src/oh-installfiles | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/oh-installfiles b/src/oh-installfiles index 57a0246..ca52025 100644 --- a/src/oh-installfiles +++ b/src/oh-installfiles @@ -39,18 +39,18 @@ IFS=' while [ ${#} -gt 0 ]; do printf 'oh-installfiles: Installing files for package "%s"...\n' "${1}" - mkdir ${1}.data - chmod 755 ${1}.data + mkdir ${1}.data || exit 1 + chmod 755 ${1}.data || exit 1 # Loop over lines in the 'install' file. while read -r pattern; do # Ensure that the full directory path of the pattern exists in the # package staging area. pattern_dir=$(dirname ${pattern}) - mkdir -p ${1}.data/${pattern_dir} + mkdir -p ${1}.data/${pattern_dir} || exit 1 # Move any matching files from the installation destination to the # package staging area. - mv dest/${pattern} ${1}.data/${pattern_dir} + mv dest/${pattern} ${1}.data/${pattern_dir} || exit 1 done < ../${1}.pkg/install shift done |