From 9753f01001f45b6fcff64dc9132bde694cd0a4db Mon Sep 17 00:00:00 2001 From: Epic Curious <109078515+epiccurious@users.noreply.github.com> Date: Wed, 29 Nov 2023 18:06:48 -0500 Subject: [PATCH] Lots of changes --- flash_your_device | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/flash_your_device b/flash_your_device index 6eb3897..5587638 100755 --- a/flash_your_device +++ b/flash_your_device @@ -73,7 +73,7 @@ case "$(uname -s)" in echo -e "\n************************************************************" echo "ERROR: Automatic installation of CMake is not supported yet." - echo "Please manually install \"${cmake_macos_dmg}\"." + echo "Please manually install ${cmake_macos_dmg}." echo "Please open the file from your Downloads folder." echo -e "************************************************************\n" exit 1 @@ -97,32 +97,31 @@ esac echo -n "Checking for the Espressif IoT Development Framework... " if [ ! -f "${esp_idf_save_directory}"/export.sh ]; then echo -ne "\n Downloading the framework... " - git clone --quiet "${esp_idf_repo_url}" "${esp_idf_temp_directory}" + git -c advice.detachedHead=false clone --branch "${esp_idf_git_tag}" --single-branch --depth 1 --quiet "${esp_idf_repo_url}" "${esp_idf_temp_directory}" cd "${esp_idf_temp_directory}"/ - git checkout --quiet "${esp_idf_git_tag}" - git submodule update --quiet --init --recursive - echo "ok." - echo -n " Installing the framework... " - ./install.sh esp32 1>/dev/null - echo "ok." - echo -n " Exporting the framework... " - . ./export.sh 1>/dev/null + git submodule update --depth 1 --quiet --init --recursive + ./install.sh esp32 &>/dev/null + # shellcheck source=/dev/null + source ./export.sh 1>/dev/null mv "${esp_idf_temp_directory}" "${esp_idf_save_directory}" + echo "ok." else - cd "${esp_idf_save_directory}" - echo -n " Exporting the framework... " - . ./export.sh 1>/dev/null + echo fi +cd "${esp_idf_save_directory}" +echo -ne " Installing the framework... " +./install.sh esp32 1>/dev/null +echo -ne "ok.\n Exporting the framework... " +# shellcheck source=/dev/null +source ./export.sh 1>/dev/null echo "ok." echo -n "Checking for the Blockstream Jade repository... " -jade_ if [ ! -d "${working_directory}"/jade ]; then echo -ne "\n Downloading Jade... " - git clone --quiet "${jade_repo_url}" "${jade_save_directory}" + git -c advice.detachedHead=false clone --branch "${jade_git_tag}" --single-branch --depth 1 --quiet "${jade_repo_url}" "${jade_save_directory}" cd "${jade_save_directory}" - git checkout --quiet "${jade_git_tag}" - git submodule update --quiet --init --recursive + git submodule update --depth 1 --quiet --init --recursive fi cd "${jade_save_directory}" jade_version="$(git describe --tags)" @@ -191,8 +190,8 @@ case "${machine}" in # macos_usb_serial=$(ioreg -p IOUSB -n "USB Single Serial" | grep "USB Serial Number" | cut -c 34-43) #done - echo -e "Connect your ${chosen_device} with a USB-C cable,\n click \"Allow\" if you see a macOS security popup," - read -srn1 -p " and PRESS ANY KEY to continue... " && echo + echo -e "Connect your ${chosen_device} with a USB-C cable,\n and click Allow if you see a security popup." + read -srn1 -p " PRESS ANY KEY to continue... " && echo && echo ;; *) echo "Unsupported OS: $(uname -s)" && exit 0 esac @@ -201,9 +200,10 @@ echo -e "Ready to install Jade ${jade_version} on your ${chosen_device}.\n (Thi read -srn1 -p " PRESS ANY KEY to continue... " && echo final_confirmation_sleep_time="10" -echo -ne "\nPlease wait ${final_confirmation_sleep_time} seconds or press Ctrl+C to cancel... " +echo -ne "\nJade ${jade_version} installion will begin in ${final_confirmation_sleep_time} seconds.\nPress Ctrl+C to cancel... " sleep "${final_confirmation_sleep_time}" echo + ${flash_command} -echo -e "\nSUCCESS! Jade ${jade_version} is now installed on your ${chosen_device}." +echo -e "\nSUCCESS! Jade ${jade_version} is now installed on your ${chosen_device}.\nYou can close this window now.\n"