From 106157fdaefed2d8c0bc3289391ad4d12837bb64 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Wed, 30 Jun 2021 16:03:51 +0200 Subject: [PATCH] Do not assume there is a group named as $USER Remove any use of chown $USER:$USER --- common/libs/func_install_blfs | 6 +++--- jhalfs | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/common/libs/func_install_blfs b/common/libs/func_install_blfs index 991b96d..5fafc99 100644 --- a/common/libs/func_install_blfs +++ b/common/libs/func_install_blfs @@ -7,9 +7,9 @@ install_blfs_tools() { # the scriptlets to build #----------------------------# the dependency tools set -e # Install the files -[[ ! -d ${BUILDDIR}${BLFS_ROOT} ]] && { - sudo mkdir -pv ${BUILDDIR}${BLFS_ROOT} - sudo chown $USER:$USER ${BUILDDIR}${BLFS_ROOT} +[[ ! -d "${BUILDDIR}${BLFS_ROOT}" ]] && { + sudo mkdir -pv "${BUILDDIR}${BLFS_ROOT}" + sudo chown "$USER" "${BUILDDIR}${BLFS_ROOT}" } cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT} cp -r menu ${BUILDDIR}${BLFS_ROOT} diff --git a/jhalfs b/jhalfs index a82d6e5..75e83f1 100755 --- a/jhalfs +++ b/jhalfs @@ -367,7 +367,9 @@ if [[ "$REBUILD_MAKEFILE" = "n" ]] ; then if [[ ! -d $JHALFSDIR ]]; then 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 # Create $BUILDDIR/sources even though it could be created by get_sources()