From 43f3ac656309e5341b7d935beeb6216e5b63273a Mon Sep 17 00:00:00 2001 From: starcalc Date: Tue, 30 Aug 2022 21:17:10 +0200 Subject: [PATCH] Upload via sh, not bash --- uploadfs.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/uploadfs.sh b/uploadfs.sh index 6828c6a..a93d886 100644 --- a/uploadfs.sh +++ b/uploadfs.sh @@ -1,7 +1,17 @@ -#!/bin/bash -while IFS="," read -r curhost curip +#!/bin/sh + +while read line do + echo "Line is ${line}" + curhost = $(cat ${line} | cut -d ',' -f1) + curip = $(cat ${line} | cut -d ',' -f2) echo "Host ${curhost} and IP ${curip}" - # Upload this image curl --insecure --no-progress-meter --fail-with-body --request POST --url "https://espota.ctdo.de/" --header "Content-Type: multipart/form-data" --form ip="$curip" --form spiffs=@.pio/build/d1_mini/spiffs_${curhost}.bin --no-buffer -done < <(cat lastknownhostips) \ No newline at end of file +done < <(cat lastknownhostips) +#!/bin/bash +#while IFS="," read -r curhost curip +#do +# echo "Host ${curhost} and IP ${curip}" +# # Upload this image +# curl --insecure --no-progress-meter --fail-with-body --request POST --url "https://espota.ctdo.de/" --header "Content-Type: multipart/form-data" --form ip="$curip" --form spiffs=@.pio/build/d1_mini/spiffs_${curhost}.bin --no-buffer +#done < <(cat lastknownhostips) \ No newline at end of file