Skip to content

Commit

Permalink
feat: add change to device-specific scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
epiccurious committed Dec 17, 2023
1 parent ec5b2eb commit 054ae38
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 52 deletions.
24 changes: 11 additions & 13 deletions device_specific/flash_the_m5stack_core_basic
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,17 @@ fi

echo "LINUX ONLY. Flashing the ${chosen_device}..."

if ! command -v cmake &> /dev/null; then
echo -e "\nERROR:\ncmake was not found on your system.\nPlease install cmake by running:\n\nsudo apt update && sudo apt install -y cmake\n"
exit 1
elif ! command -v git &> /dev/null; then
echo -e "\nERROR:\ngit was not found on your system.\nPlease install git by running:\n\nsudo apt update && sudo apt install -y git\n"
exit 1
elif ! command -v pip &> /dev/null; then
echo -e "\n\RROR:\npip was not found on your system.\nPlease install pip by running:\n\nsudo apt update && sudo apt install -y python3-pip\n"
exit 1
elif ! command -v virtualenv &> /dev/null; then
echo -e "\nERROR:\nvirtualenv was not found on your system.\nPlease install virtualenv by running:\n\nsudo apt update && sudo apt install -y python3-virtualenv\n"
exit 1
fi
while read -r dependency; do
if ! command -v "${dependency}" &> /dev/null; then
echo -en "\n\nERROR:\n${dependency} was not found on your system.\nPlease install ${dependency} by running:\n\n"
if [ "${dependency}" == "pip" ] || [ "${dependency}" == "virtualenv" ]; then
echo -en "sudo apt update && sudo apt install -y python3-${dependency}\n\n"
else
echo -en "sudo apt update && sudo apt install -y ${dependency}\n\n"
fi
exit 1
fi
done < <(curl -fsSL https://github.com/epiccurious/jade-diy/raw/master/depends.txt)

if [ ! -f "${esp_idf_save_directory}"/export.sh ]; then
git clone --branch "${esp_idf_git_tag}" --single-branch --depth 1 "${esp_idf_repo_url}" "${esp_idf_temp_directory}"
Expand Down
24 changes: 11 additions & 13 deletions device_specific/flash_the_m5stack_fire
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,17 @@ fi

echo "LINUX ONLY. Flashing the ${chosen_device}..."

if ! command -v cmake &> /dev/null; then
echo -e "\nERROR:\ncmake was not found on your system.\nPlease install cmake by running:\n\nsudo apt update && sudo apt install -y cmake\n"
exit 1
elif ! command -v git &> /dev/null; then
echo -e "\nERROR:\ngit was not found on your system.\nPlease install git by running:\n\nsudo apt update && sudo apt install -y git\n"
exit 1
elif ! command -v pip &> /dev/null; then
echo -e "\n\RROR:\npip was not found on your system.\nPlease install pip by running:\n\nsudo apt update && sudo apt install -y python3-pip\n"
exit 1
elif ! command -v virtualenv &> /dev/null; then
echo -e "\nERROR:\nvirtualenv was not found on your system.\nPlease install virtualenv by running:\n\nsudo apt update && sudo apt install -y python3-virtualenv\n"
exit 1
fi
while read -r dependency; do
if ! command -v "${dependency}" &> /dev/null; then
echo -en "\n\nERROR:\n${dependency} was not found on your system.\nPlease install ${dependency} by running:\n\n"
if [ "${dependency}" == "pip" ] || [ "${dependency}" == "virtualenv" ]; then
echo -en "sudo apt update && sudo apt install -y python3-${dependency}\n\n"
else
echo -en "sudo apt update && sudo apt install -y ${dependency}\n\n"
fi
exit 1
fi
done < <(curl -fsSL https://github.com/epiccurious/jade-diy/raw/master/depends.txt)

if [ ! -f "${esp_idf_save_directory}"/export.sh ]; then
git clone --branch "${esp_idf_git_tag}" --single-branch --depth 1 "${esp_idf_repo_url}" "${esp_idf_temp_directory}"
Expand Down
24 changes: 11 additions & 13 deletions device_specific/flash_the_m5stack_m5stickc_plus
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,17 @@ fi

echo "LINUX ONLY. Flashing the ${chosen_device}..."

if ! command -v cmake &> /dev/null; then
echo -e "\nERROR:\ncmake was not found on your system.\nPlease install cmake by running:\n\nsudo apt update && sudo apt install -y cmake\n"
exit 1
elif ! command -v git &> /dev/null; then
echo -e "\nERROR:\ngit was not found on your system.\nPlease install git by running:\n\nsudo apt update && sudo apt install -y git\n"
exit 1
elif ! command -v pip &> /dev/null; then
echo -e "\n\RROR:\npip was not found on your system.\nPlease install pip by running:\n\nsudo apt update && sudo apt install -y python3-pip\n"
exit 1
elif ! command -v virtualenv &> /dev/null; then
echo -e "\nERROR:\nvirtualenv was not found on your system.\nPlease install virtualenv by running:\n\nsudo apt update && sudo apt install -y python3-virtualenv\n"
exit 1
fi
while read -r dependency; do
if ! command -v "${dependency}" &> /dev/null; then
echo -en "\n\nERROR:\n${dependency} was not found on your system.\nPlease install ${dependency} by running:\n\n"
if [ "${dependency}" == "pip" ] || [ "${dependency}" == "virtualenv" ]; then
echo -en "sudo apt update && sudo apt install -y python3-${dependency}\n\n"
else
echo -en "sudo apt update && sudo apt install -y ${dependency}\n\n"
fi
exit 1
fi
done < <(curl -fsSL https://github.com/epiccurious/jade-diy/raw/master/depends.txt)

if [ ! -f "${esp_idf_save_directory}"/export.sh ]; then
git clone --branch "${esp_idf_git_tag}" --single-branch --depth 1 "${esp_idf_repo_url}" "${esp_idf_temp_directory}"
Expand Down
24 changes: 11 additions & 13 deletions device_specific/flash_the_ttgo_tdisplay
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,17 @@ fi

echo "LINUX ONLY. Flashing the ${chosen_device}..."

if ! command -v cmake &> /dev/null; then
echo -e "\nERROR:\ncmake was not found on your system.\nPlease install cmake by running:\n\nsudo apt update && sudo apt install -y cmake\n"
exit 1
elif ! command -v git &> /dev/null; then
echo -e "\nERROR:\ngit was not found on your system.\nPlease install git by running:\n\nsudo apt update && sudo apt install -y git\n"
exit 1
elif ! command -v pip &> /dev/null; then
echo -e "\n\RROR:\npip was not found on your system.\nPlease install pip by running:\n\nsudo apt update && sudo apt install -y python3-pip\n"
exit 1
elif ! command -v virtualenv &> /dev/null; then
echo -e "\nERROR:\nvirtualenv was not found on your system.\nPlease install virtualenv by running:\n\nsudo apt update && sudo apt install -y python3-virtualenv\n"
exit 1
fi
while read -r dependency; do
if ! command -v "${dependency}" &> /dev/null; then
echo -en "\n\nERROR:\n${dependency} was not found on your system.\nPlease install ${dependency} by running:\n\n"
if [ "${dependency}" == "pip" ] || [ "${dependency}" == "virtualenv" ]; then
echo -en "sudo apt update && sudo apt install -y python3-${dependency}\n\n"
else
echo -en "sudo apt update && sudo apt install -y ${dependency}\n\n"
fi
exit 1
fi
done < <(curl -fsSL https://github.com/epiccurious/jade-diy/raw/master/depends.txt)

if [ ! -f "${esp_idf_save_directory}"/export.sh ]; then
git clone --branch "${esp_idf_git_tag}" --single-branch --depth 1 "${esp_idf_repo_url}" "${esp_idf_temp_directory}"
Expand Down

0 comments on commit 054ae38

Please sign in to comment.