X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions%2Fmain;h=4af62ad87c267a9182b7c7bb17befcc2b346fdb0;hb=bdd3347ff8920ece383a232d12aef0d3720c8bff;hp=842a8f79c0e54da25aabd9c74588db35b946a665;hpb=14ad1e23484d4394eea4a8d0386995190a05039d;p=hvlinux.git diff --git a/functions/main b/functions/main index 842a8f7..4af62ad 100644 --- a/functions/main +++ b/functions/main @@ -2,8 +2,8 @@ set -o errtrace # Let shell functions inherit ERR trap. set -o errexit -# Don' t locate and remember (hash) commands as they are looked up for -# execution (don' t remember path): +# Don't locate and remember (hash) commands as they are looked up for +# execution (don't remember path): set +h hvtrap_setup() @@ -62,6 +62,9 @@ fi CLFS=${LFS} +CROSS_TOOLS_DIR=${CLFS}/cross-tools +TOOLS_DIR=${CLFS}/tools + # Load functions source ../functions/fpkg source ../functions/lpkg @@ -102,7 +105,11 @@ if [ -f ../targets/${HVL_TARGET} ]; then source ../targets/${HVL_TARGET} fi -CLFS_TARGET="${CLFS_ARCH}-${CLFS_OS}-${CLFS_ABI}" +# When CLFS_OS is defined, define target as the standard triplet: +CLFS_TARGET="${CLFS_ARCH}" +if [ x"${CLFS_OS}" != x ]; then + CLFS_TARGET+="-${CLFS_OS}-${CLFS_ABI}" +fi CLFS_HOST="$(echo $MACHTYPE | \ sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")" @@ -551,23 +558,6 @@ var_add_shadow() sed -i "s!\(^${VARIABLE}.*\)!\1:${VALUE}!" ${FILE} } -# Adding a new group, checking if it already exist before. -# Arguments: same arguments as for standard groupadd command. -hv_groupadd() -{ - arguments=${*} - - # The last argument is the group name - while [ $# -ne 0 ]; do - groupname=${*} - shift - done - - if ! cat /etc/group | egrep -q "^${groupname}:"; then - groupadd ${arguments} - fi -} - # Adding a new user, checking if it already exist before # Arguments: same arguments as for standard useradd command. hv_useradd()