fw-clean.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #!/bin/bash
  2. #
  3. # fw-clean.sh - multi-language support script
  4. # Remove all firmware output files from lang folder.
  5. #
  6. result=0
  7. rm_if_exists()
  8. {
  9. if [ -e $1 ]; then
  10. echo -n " removing '$1'..." >&2
  11. if rm $1; then
  12. echo "OK" >&2
  13. else
  14. echo "NG!" >&2
  15. result=1
  16. fi
  17. fi
  18. }
  19. echo "fw-clean.sh started" >&2
  20. rm_if_exists text.sym
  21. rm_if_exists progmem1.sym
  22. rm_if_exists progmem1.lss
  23. rm_if_exists progmem1.hex
  24. rm_if_exists progmem1.chr
  25. rm_if_exists progmem1.var
  26. rm_if_exists progmem1.txt
  27. rm_if_exists textaddr.txt
  28. rm_if_exists firmware.bin
  29. rm_if_exists firmware.hex
  30. rm_if_exists firmware_cz.hex
  31. rm_if_exists firmware_de.hex
  32. rm_if_exists firmware_es.hex
  33. rm_if_exists firmware_fr.hex
  34. rm_if_exists firmware_it.hex
  35. rm_if_exists firmware_nl.hex
  36. rm_if_exists firmware_pl.hex
  37. rm_if_exists progmem.out
  38. rm_if_exists textaddr.out
  39. rm_if_exists update_lang.out
  40. rm_if_exists update_lang_cz.out
  41. rm_if_exists update_lang_de.out
  42. rm_if_exists update_lang_es.out
  43. rm_if_exists update_lang_fr.out
  44. rm_if_exists update_lang_it.out
  45. rm_if_exists update_lang_nl.out
  46. rm_if_exists update_lang_pl.out
  47. rm_if_exists lang.bin
  48. rm_if_exists lang.hex
  49. echo -n "fw-clean.sh finished" >&2
  50. if [ $result -eq 0 ]; then
  51. echo " with success" >&2
  52. else
  53. echo " with errors!" >&2
  54. fi
  55. case "$-" in
  56. *i*) echo "press enter key"; read ;;
  57. esac
  58. exit $result