fw-clean.sh 1.4 KB

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