env_restore 537 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. [ -z "$1" ] || cd $1
  3. if [ -d ".test" ]; then
  4. cp .test/Configuration*.h Marlin/
  5. rm .test/Configuration*.h
  6. if [ -f .test/_Bootscreen.h ]; then
  7. cp .test/_Bootscreen.h Marlin/
  8. rm .test/_Bootscreen.h
  9. fi
  10. if [ -f .test/_Statusscreen.h ]; then
  11. cp .test/_Statusscreen.h Marlin/
  12. rm .test/_Statusscreen.h
  13. fi
  14. cp -r .test/pins Marlin/src
  15. rm -r .test/pins
  16. rmdir .test
  17. printf "\033[0;32mEnvironment Restored\033[0m\n"
  18. else
  19. printf "\033[0;31mEnvironment Backup not available!\033[0m\n"
  20. fi