* Remove syspatch files from the installed system and not the ramdisk. * Use extended globs and generally adopt to the style of this script.
ok? I'm not very happy with the way the clang version is determined. If we ever were to move to 10.0.0, this would remove the wrong directory. I considered examining the output of "chroot /mnt /usr/bin/clang -v", but I don't like that much either. Index: distrib/miniroot/install.sub =================================================================== RCS file: /cvs/src/distrib/miniroot/install.sub,v retrieving revision 1.1138 diff -u -p -r1.1138 install.sub --- distrib/miniroot/install.sub 13 Aug 2019 07:47:40 -0000 1.1138 +++ distrib/miniroot/install.sub 13 Aug 2019 19:45:23 -0000 @@ -2860,14 +2860,16 @@ __EOT } clean_old() { + local _cver + if [[ -f /mnt/usr/bin/gcc ]]; then - rm -rf -- `ls -d /mnt/usr/lib/gcc-lib/* | grep -v ${VNAME}$` + rm -rf /mnt/usr/lib/gcc-lib/!(*$VNAME) fi if [[ -f /mnt/usr/bin/clang ]]; then - CVER=$(cd /mnt/usr/lib/clang && ls -r | sed -e 1q) - rm -rf -- `ls -d /mnt/usr/lib/clang/* | grep -v "${CVER}$"` + _cver=$(cd /mnt/usr/lib/clang && ls -r | sed -e 1q) && + rm -rf /mnt/usr/lib/clang/!($_cver) fi - rm -rf /var/syspatch/* + rm -rf /mnt/var/syspatch/* } do_autoinstall() { -- Christian "naddy" Weisgerber na...@mips.inka.de