Skip to content

Commit

Permalink
Lots of changes
Browse files Browse the repository at this point in the history
  • Loading branch information
epiccurious authored Nov 29, 2023
1 parent 066b5c1 commit 9753f01
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions flash_your_device
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)"
Expand Down Expand Up @@ -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
Expand All @@ -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"

0 comments on commit 9753f01

Please sign in to comment.