summaryrefslogtreecommitdiffstats
path: root/tools/daisy-img-modify.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/daisy-img-modify.sh')
-rwxr-xr-xtools/daisy-img-modify.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/daisy-img-modify.sh b/tools/daisy-img-modify.sh
index 8b3a21f..ff1ff43 100755
--- a/tools/daisy-img-modify.sh
+++ b/tools/daisy-img-modify.sh
@@ -99,7 +99,10 @@ raw_imgfile="${workdir}/centos7.raw"
# download and checksum base image, conditionally if local copy is outdated
download() {
- test -d $workdir || mkdir -p $workdir
+ test -d $workdir || {
+ mkdir -p $workdir
+ test -z $SUDO_USER || chown -R $SUDO_USER:$SUDO_USER $workdir
+ }
cd $workdir
rm -f sha256sum.txt
wget $sha256sum_url