diff options
author | Dave Reisner <dreisner@archlinux.org> | 2013-11-23 22:47:13 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2013-11-24 02:57:13 +0100 |
commit | caf145fd4a6269b747c0f6134868b9b748dd73f3 (patch) | |
tree | 028fb7e91de28319126369ced77fdd7309f207e0 | |
parent | 1bf318f11d42522973633aa1c837693476c3a9e0 (diff) | |
download | mkinitcpio-caf145fd4a6269b747c0f6134868b9b748dd73f3.tar.gz mkinitcpio-caf145fd4a6269b747c0f6134868b9b748dd73f3.tar.xz |
functions: error out when buildroot isn't writeable
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r-- | functions | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -635,6 +635,11 @@ initialize_buildroot() { fi buildroot=${2:-$workdir/root} + if [[ ! -w ${2:-$workdir} ]]; then + error 'Unable to write to build root: %s' "$buildroot" + return 1 + fi + # base directory structure install -dm755 "$buildroot"/{new_root,proc,sys,dev,run,tmp,etc,usr/{local,lib,bin}} ln -s "usr/lib" "$buildroot/lib" |