fw-clean.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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_pl.hex
  36. rm_if_exists progmem.out
  37. rm_if_exists textaddr.out
  38. rm_if_exists update_lang.out
  39. rm_if_exists update_lang_cz.out
  40. rm_if_exists update_lang_de.out
  41. rm_if_exists update_lang_es.out
  42. rm_if_exists update_lang_fr.out
  43. rm_if_exists update_lang_it.out
  44. rm_if_exists update_lang_nl.out
  45. rm_if_exists update_lang_pl.out
  46. rm_if_exists lang.bin
  47. rm_if_exists lang.hex
  48. #Community language support
  49. #Dutch
  50. rm_if_exists firmware_nl.hex
  51. #Use the 2 lines below as a template and replace 'qr'
  52. ##New language
  53. #rm_if_exists firmware_qr.hex
  54. echo -n "fw-clean.sh finished" >&2
  55. if [ $result -eq 0 ]; then
  56. echo " with success" >&2
  57. else
  58. echo " with errors!" >&2
  59. fi
  60. case "$-" in
  61. *i*) echo "press enter key"; read ;;
  62. esac
  63. exit $result