Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: venv dependency check on debian #14

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion depends.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ cmake
curl
git
pip
virtualenv
10 changes: 9 additions & 1 deletion device_specific/flash_the_m5stack_core_basic
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ echo "Flashing the ${chosen_device}..."
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
if [ "${dependency}" == "pip" ]; 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"
Expand All @@ -61,6 +61,14 @@ while read -r dependency; do
fi
done < <(curl -fsSL https://github.com/bitcoin-tools/diyjade/raw/master/depends.txt)

if grep -qEi '(debian|ubuntu)' /etc/os-release; then
if ! dpkg -s python3-venv &> /dev/null; then
echo -en "Package python3-venv is missing, please install by running:\n\n"
echo -en "sudo apt update && sudo apt install -y python3-venv\n\n"
exit 1
fi
fi

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}"
cd "${esp_idf_temp_directory}"/
Expand Down
10 changes: 9 additions & 1 deletion device_specific/flash_the_m5stack_fire
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ echo "Flashing the ${chosen_device}..."
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
if [ "${dependency}" == "pip" ]; 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"
Expand All @@ -61,6 +61,14 @@ while read -r dependency; do
fi
done < <(curl -fsSL https://github.com/bitcoin-tools/diyjade/raw/master/depends.txt)

if grep -qEi '(debian|ubuntu)' /etc/os-release; then
if ! dpkg -s python3-venv &> /dev/null; then
echo -en "Package python3-venv is missing, please install by running:\n\n"
echo -en "sudo apt update && sudo apt install -y python3-venv\n\n"
exit 1
fi
fi

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}"
cd "${esp_idf_temp_directory}"/
Expand Down
10 changes: 9 additions & 1 deletion device_specific/flash_the_m5stack_m5stickc_plus
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ echo "Flashing the ${chosen_device}..."
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
if [ "${dependency}" == "pip" ]; 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"
Expand All @@ -61,6 +61,14 @@ while read -r dependency; do
fi
done < <(curl -fsSL https://github.com/bitcoin-tools/diyjade/raw/master/depends.txt)

if grep -qEi '(debian|ubuntu)' /etc/os-release; then
if ! dpkg -s python3-venv &> /dev/null; then
echo -en "Package python3-venv is missing, please install by running:\n\n"
echo -en "sudo apt update && sudo apt install -y python3-venv\n\n"
exit 1
fi
fi

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}"
cd "${esp_idf_temp_directory}"/
Expand Down
10 changes: 9 additions & 1 deletion device_specific/flash_the_ttgo_tdisplay
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ echo "Flashing the ${chosen_device}..."
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
if [ "${dependency}" == "pip" ]; 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"
Expand All @@ -61,6 +61,14 @@ while read -r dependency; do
fi
done < <(curl -fsSL https://github.com/bitcoin-tools/diyjade/raw/master/depends.txt)

if grep -qEi '(debian|ubuntu)' /etc/os-release; then
if ! dpkg -s python3-venv &> /dev/null; then
echo -en "Package python3-venv is missing, please install by running:\n\n"
echo -en "sudo apt update && sudo apt install -y python3-venv\n\n"
exit 1
fi
fi

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}"
cd "${esp_idf_temp_directory}"/
Expand Down
11 changes: 10 additions & 1 deletion flash_your_device
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Linux*)
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
if [ "${dependency}" == "pip" ]; 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"
Expand All @@ -62,6 +62,15 @@ Linux*)
fi
done < <(curl -fsSL https://github.com/bitcoin-tools/diyjade/raw/master/depends.txt)
echo "ok."

if grep -qEi '(debian|ubuntu)' /etc/os-release; then
if ! dpkg -s python3-venv &> /dev/null; then
echo -en "Package python3-venv is missing, please install by running:\n\n"
echo -en "sudo apt update && sudo apt install -y python3-venv\n\n"
exit 1
fi
fi

;;
Darwin*)
machine="macOS"
Expand Down