summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-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 8b3a21f3..ff1ff437 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