diff --git a/custom_bin/changeesp.sh b/custom_bin/changeesp.sh index ae5364d..175f2c8 100755 --- a/custom_bin/changeesp.sh +++ b/custom_bin/changeesp.sh @@ -1,8 +1,15 @@ -echo "\nChanging ESPTARGET\n" -echo "Set esp target (esp32, esp32s3, esp32c6, esp8266, etc)" -read esp +subprocess() { + echo "\nChanging ESPTARGET\n" + echo "Set esp target (esp32, esp32s3, esp32c6, esp8266, etc)" + read esp + eval "$1=$esp" + return 0 +} -export ESPTARGET="${esp}" +ret='' +subprocess ret + +export ESPTARGET="${ret}" echo "\nESPTARGET set to ${ESPTARGET}\n" echo "\nall done :3\n" \ No newline at end of file