Add cockpit function, make variable local, remove output in checkupdates condition

This commit is contained in:
flyingscorpio@arch-desktop 2020-10-30 12:22:04 +01:00
parent e02563dfec
commit 9c5e6cfa5f

View file

@ -50,13 +50,19 @@ clitip() {
GIT_REPOS=(~/SetupCockpit ~/Keepass ~/Lessons/* ~/PersonalScripts ~/RootMe ~/SRC/*)
cockpit() { # enable pass-like commands (ex: cockpit git push)
local start_dir="$PWD"
cd ~/SetupCockpit && "$@"
cd "$start_dir" && echo 'done'
}
hello() {
start_dir="$PWD"
local start_dir="$PWD"
sudo protonvpn c -f
echo
# Don't update if its a kernel update that will require reboot
if checkupdates | grep linux; then
case "$(checkupdates | grep linux)" in
if checkupdates >/dev/null 2>&1; then
case "$(checkupdates | grep linux && echo)" in
*linux*)
echo "Not performing update"
;;