From caf145fd4a6269b747c0f6134868b9b748dd73f3 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 23 Nov 2013 16:47:13 -0500 Subject: functions: error out when buildroot isn't writeable Signed-off-by: Dave Reisner --- functions | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions b/functions index 81a6072..9a29a17 100644 --- a/functions +++ b/functions @@ -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" -- cgit v1.2.3-24-g4f1b