|
|
@@ -1,4 +1,11 @@
|
|
|
#!/bin/bash
|
|
|
+if [ "$1" == "" ]; then
|
|
|
+ echo "Only building, not flashing. Add a tty port for flashing."
|
|
|
+else
|
|
|
+ port="/dev/ttyUSB0";
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
echo "Uploading to the server.."
|
|
|
command="curl http://imegumii.space:12001/upradio.php -w '\n' --progress-bar ";
|
|
|
for i in *.c *.h; do
|
|
|
@@ -14,7 +21,7 @@ if [ "$output" = "success" ]; then
|
|
|
echo "Downloading hex file.."
|
|
|
wget http://imegumii.space:12001/source/ipac.hex -q --show-progress;
|
|
|
echo "Starting flash..";
|
|
|
- mono internetradioflash.exe f=ipac.hex p="/dev/ttyUSB0"
|
|
|
+ mono internetradioflash.exe f=ipac.hex p="$port"
|
|
|
else
|
|
|
echo "Errors when making; Stopped";
|
|
|
fi
|