From 5adc3fdb2e88dad8f1ea898b626386855419b899 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Wed, 23 Nov 2005 20:21:17 +0000 Subject: [PATCH] Fixed remainig issues with pre-existing lfs user. Fixed clean-all target to not delete the book sources directory. --- jhalfs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/jhalfs b/jhalfs index 66e1844..410bff2 100755 --- a/jhalfs +++ b/jhalfs @@ -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: