Procházet zdrojové kódy

Have `make clean` remove directories as well

But apply at least minimal safeguards from running `rm -rf /` or
similar catastrophic cases.
Alois Mahdal před 9 roky
rodič
revize
263c0b37b1
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2
    1
      src/include/build.sh

+ 2
- 1
src/include/build.sh Zobrazit soubor

@@ -77,7 +77,8 @@ clean() {
77 77
     # Clean up tree after building
78 78
     #
79 79
     test -f "$MKIT_LOCAL/built.lst" && {
80
-        <"$MKIT_LOCAL/built.lst" xargs -r rm -f
80
+        <"$MKIT_LOCAL/built.lst" grep -v -e '\.\.' -e ^/ \
81
+          | xargs -r rm -rf
81 82
         rm -f "$MKIT_LOCAL/built.lst"
82 83
         rmdir --ignore-fail-on-non-empty "$MKIT_LOCAL"
83 84
     }