Do not assume there is a group named as $USER

Remove any use of chown $USER:$USER
This commit is contained in:
Pierre Labastie 2021-06-30 16:03:51 +02:00
parent 0722dde31d
commit 106157fdae
2 changed files with 6 additions and 4 deletions

View file

@ -7,9 +7,9 @@ install_blfs_tools() { # the scriptlets to build
#----------------------------# the dependency tools #----------------------------# the dependency tools
set -e set -e
# Install the files # Install the files
[[ ! -d ${BUILDDIR}${BLFS_ROOT} ]] && { [[ ! -d "${BUILDDIR}${BLFS_ROOT}" ]] && {
sudo mkdir -pv ${BUILDDIR}${BLFS_ROOT} sudo mkdir -pv "${BUILDDIR}${BLFS_ROOT}"
sudo chown $USER:$USER ${BUILDDIR}${BLFS_ROOT} sudo chown "$USER" "${BUILDDIR}${BLFS_ROOT}"
} }
cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT} cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT}
cp -r menu ${BUILDDIR}${BLFS_ROOT} cp -r menu ${BUILDDIR}${BLFS_ROOT}

4
jhalfs
View file

@ -367,7 +367,9 @@ if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then
if [[ ! -d $JHALFSDIR ]]; then if [[ ! -d $JHALFSDIR ]]; then
sudo mkdir -p "$JHALFSDIR" sudo mkdir -p "$JHALFSDIR"
sudo chown "$USER":"$USER" "$JHALFSDIR" # Do not assume there is a group named as $USER, do not use
# $USER:$USER...
sudo chown "$USER" "$JHALFSDIR"
fi fi
# Create $BUILDDIR/sources even though it could be created by get_sources() # Create $BUILDDIR/sources even though it could be created by get_sources()