Update directory permissions when using sudo
This commit is contained in:
parent
8396c95368
commit
fa7052927f
@ -547,6 +547,12 @@ prepare_host()
|
||||
|
||||
# create directory structure
|
||||
mkdir -p $DEST/debs/extra $DEST/{config,debug,patch} $SRC/userpatches/overlay $SRC/cache/{sources,toolchains,rootfs} $SRC/.tmp
|
||||
if [[ -n $SUDO_USER ]]; then
|
||||
chgrp --quiet sudo cache output userpatches
|
||||
# SGID bit on cache/sources breaks kernel dpkg packaging
|
||||
chmod --quiet g+w,g+s output userpatches
|
||||
fi
|
||||
|
||||
find $SRC/patch -type d ! -name . | sed "s%/patch%/userpatches%" | xargs mkdir -p
|
||||
|
||||
# download external Linaro compiler and missing special dependencies since they are needed for certain sources
|
||||
|
||||
@ -17,6 +17,10 @@ if [[ $(basename $0) == main.sh ]]; then
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# default umask for root is 022 so parent directories won't be group writeable without this
|
||||
# this is used instead of making the chmod in prepare_host() recursive
|
||||
umask 002
|
||||
|
||||
# destination
|
||||
DEST=$SRC/output
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user