parse_api_ver.sh 402 B

123456789101112131415
  1. #!/bin/bash
  2. # Parse API Version from api_symbols.csv
  3. FILE=unleashed-firmware/firmware/targets/f7/api_symbols.csv
  4. OLDIFS=$IFS
  5. IFS=','
  6. [ ! -f $FILE ] && { echo "$FILE not found"; exit 99; }
  7. while read entry status name type params
  8. do
  9. if [ "$entry" == "Version" ]; then
  10. echo "API: $name"
  11. echo "Apps build for Unleashed FW with API version: $name" > changelog.md
  12. break;
  13. fi
  14. done < $FILE
  15. IFS=$OLDIFS