make.sh 518 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. echo "Uploading to the server.."
  3. command="curl http://imegumii.space:12001/upradio.php -w '\n' --progress-bar ";
  4. for i in *.c; do
  5. command="$command -F \"file[]=@$i\"";
  6. done
  7. output=$(eval $command);
  8. echo "$output";
  9. if [ "$output" = "success" ]; then
  10. rm ipac.hex -f
  11. echo "Downloading hex file.."
  12. wget http://imegumii.space:12001/source/ipac.hex -q --show-progress;
  13. echo "Starting flash..";
  14. mono internetradioflash.exe f=ipac.hex p="/dev/ttyUSB0"
  15. else
  16. echo "Errors when making; Stopped";
  17. fi