source ../functions/main
-# Making sure that this script was executed by the root user
-if [ "x${USER}" != "xroot" ]; then
- echo "You must be the superuser to install hvlinux."
- exit 1
-fi
-
# Making sure that the LFS directory is accessible
if [ ! -d ${LFS} ]; then
echo "LFS destination directory not found."
fi
# Creating basic directories
-for subdir in tmp var tools cross-tools; do
+for subdir in etc tmp var tools cross-tools; do
dir=${LFS}/${subdir}
if [ ! -d ${dir} ]; then
install -dv ${dir}
chown -R lfs:lfs ${LFS}
-# Creating a link from the host root directory to LFS cross-tools directories
-for subdir in tools cross-tools; do
- ln -sfvT ${LFS}/${subdir} /${subdir}
-done
-
cat > /home/lfs/.bashrc << "EOF"
# Setting up the environment
set +h
umask 022
LC_ALL=POSIX
-PATH=/cross-tools/bin:/bin:/usr/bin
+PATH=_CLFS_CROSS_TOOLS_PATH_/bin:/bin:/usr/bin
HVMAKE="make -j ${MAKEJOBS}"
unset CFLAGS
export LC_ALL PATH HVMAKE
EOF
+sed -e "s@_CLFS_CROSS_TOOLS_PATH_@${CROSS_TOOLS_DIR}@" -i /home/lfs/.bashrc
+
chown lfs:lfs /home/lfs/.bashrc
exit $?