From 57cea5f4e37e38f256c598c63d002f4f1d68ee3d Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 16 Feb 2012 11:42:26 -0500 Subject: Make oh-installfiles exit on error. --- (limited to 'src') 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 -- cgit v0.9.1