You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
485 B

  1. #!/bin/bash
  2. cd /root/luxbuild
  3. if [[ ! -d $1 ]] ; then
  4. echo "Please provide Lux snapshot dir"
  5. echo "Usage: <snapshot> <target>"
  6. fi
  7. cd ~/luxbuild
  8. if [[ $2 == 1 ]] ; then
  9. echo " * Removing compiled distributions"
  10. sleep 3
  11. rm -vfr target-*/"$1"
  12. exit 0
  13. elif [[ $2 == 2 ]] ; then
  14. echo " * Removing distributions and sources"
  15. sleep 3
  16. rm -vfr target-*/"$1"
  17. rm -fr $1
  18. exit 0
  19. fi
  20. echo "Targets:"
  21. echo " 1 - compiled distributions"
  22. echo " 2 - distributions and sources"
  23. echo
  24. exit 1