clean_ports.sh

  1. #!/bin/sh
  2.  
  3. cd /usr/ports
  4. ARBEIT="`find * -name "work"`"
  5.  
  6. echo "Saeubere Verzeichnis /usr/ports/distfiles"
  7. cd /usr/ports/distfiles
  8. if [ "`pwd`" = "/usr/ports/distfiles" ]; then
  9.   rm -rvf *
  10. fi
  11.  
  12. cd /usr/ports
  13. for i in ${ARBEIT}; do
  14.   echo "Saeubere Verzeichnis /usr/ports/${i}"
  15.   if [ -d "/usr/ports/${i}" ]; then
  16.     cd "${i}"
  17.     cd ..
  18.     make distclean
  19.   fi
  20.   cd /usr/ports
  21. done
  22.  
  23. exit 0