Nimbin[12]?Mirrors & Forks / jhalfs / commits / 06b7314

jhalfs git · trunk

jhalfs LFS build automation (mirror)

lfs mirror bash · first commit 2005-09-11 · last commit 2024-02-13 (2 years ago) · synced 3 days ago · upstream: git.linuxfromscratch.org/jhalfs

Python 78.4% Shell 19.8% Makefile 1.8%
git clone https://git.christianimmanuel.de/mirrors-forks/jhalfs.gitwget https://git.christianimmanuel.de/mirrors-forks/jhalfs/archive/jhalfs.tar.gz

Allow two names for scriptlet containing "userdel"

Pierre Labastie · 2023-09-05 11:14 · 06b731490f368817ed489800d3409419b2156452

It used to be named "revised_chroot", it is now named "cleanup"
Allow both names by testing whether revised something is present.
 common/libs/func_compare.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/libs/func_compare.sh b/common/libs/func_compare.sh
index fb368b8..2b6f9d1 100644
--- a/common/libs/func_compare.sh
+++ b/common/libs/func_compare.sh
@@ -22,9 +22,11 @@ wrt_compare_targets() {            #
   local dir
   printf -v dir chapter%02d "$1"
 
-  sed -i '/userdel/d' $dir/*revised*
+  REVISED=cleanup
+  if ls $dir/*revised* 2>/dev/null; then REVISED=revised; fi
+  sed -i '/userdel/d' $dir/*$REVISED*
   for (( N = 2; N < ITERATIONS; N++ )); do
-     sed -i '/userdel/d' $dir-build_$N/*revised*
+     sed -i '/userdel/d' $dir-build_$N/*$REVISED*
   done
 
 }