feat(bashrc): check for internet
This commit is contained in:
parent
0982a473de
commit
21aadfad3f
1 changed files with 10 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
# Check git status of nix configs
|
# Check git status of nix configs
|
||||||
(
|
|
||||||
|
fetchNix() {(
|
||||||
cd ~/.nix || exit 1
|
cd ~/.nix || exit 1
|
||||||
git fetch --all --quiet
|
git fetch --all --quiet
|
||||||
GIT=$(git -c color.status=always status |
|
GIT=$(git -c color.status=always status |
|
||||||
|
@ -14,7 +15,14 @@
|
||||||
echo "$GIT"
|
echo "$GIT"
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
)
|
)}
|
||||||
|
|
||||||
|
# Check for internet
|
||||||
|
if wget -q --spider https://nixos.org; then
|
||||||
|
fetchNix
|
||||||
|
else
|
||||||
|
echo "Offline"
|
||||||
|
fi
|
||||||
|
|
||||||
# Pokemon Sprite
|
# Pokemon Sprite
|
||||||
pokemon-colorscripts -r 1-5
|
pokemon-colorscripts -r 1-5
|
||||||
|
|
Loading…
Reference in a new issue