Fixed remainig issues with pre-existing lfs user.

Fixed clean-all target to not delete the book sources directory.
This commit is contained in:
Manuel Canales Esparcia 2005-11-23 20:21:17 +00:00
parent de5432927f
commit 5adc3fdb2e

14
jhalfs
View file

@ -345,6 +345,8 @@ chapter4_Makefiles() {
@if [ ! -d /home/lfs ]; then \\
groupadd lfs; \\
useradd -s /bin/bash -g lfs -m -k /dev/null lfs; \\
else \\
touch user-lfs-exist; \\
fi;
@chown lfs \$(LFS)/tools && \\
chown lfs \$(LFS)/sources && \\
@ -838,21 +840,23 @@ chapter6: chapter5 $chapter6
chapter789: chapter6 $chapter789
clean-all: clean
rm -rf ./*
rm -rf ./{commands,logs,Makefile,dump-lfs-scripts.xsl,functions,packages,patches}
clean: clean-chapter789 clean-chapter6 clean-chapter5 clean-chapter4
clean-chapter4:
-userdel lfs
rm -rf /home/lfs
-if [ ! -f user-lfs-exist ]; then \\
userdel lfs; \\
rm -rf /home/lfs; \\
fi;
rm -rf \$(LFS)/tools
rm -f /tools
rm -f envars
rm -f envars user-lfs-exist
rm -f 02* logs/02*.log
clean-chapter5:
rm -rf \$(LFS)/tools/*
rm -f $chapter5 restore-lfs-env
rm -f $chapter5 restore-lfs-env sources-dir
cd logs && rm -f $chapter5 && cd ..
clean-chapter6: