Test internet connection

-run scripts only if internet is ok
This commit is contained in:
2023-11-16 15:00:35 +01:00
parent c8ced14004
commit b76e72a1ef
8 changed files with 76 additions and 6 deletions

View File

@@ -40,6 +40,13 @@ list=$(pipx list --include-injected)
echo -e "\n${underline}List installed packages:${reset}"
echo "$list"
curl -Is http://www.google.com | head -1 | grep 200 1>/dev/null
if [[ $? -eq 1 ]]; then
echo -e "\n${red}No Internet connection !${reset}"
echo -e "Exit !"
exit 1
fi
pipx-outdated() {
echo -e "\n${underline}Outdated Packages:${reset}"
while read -sr pyPkgName pyPkyVersion; do