aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/pacupgrade
blob: 564bb5b0e3d48436cb9657bb58e17323a7ef1f79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# This is just a wrapper script to upgrade system AND update status bar module

# Don't try to sync if pacman is already running
if pidof pacman; then
  echo "pacman is already running"
  exit
fi

touch ~/.cache/pacupdatelive
killall -41 waybar

if [ "$1" = "-a" ]; then
	yay -Syu
else
	sudo pacman -Syu
fi


rm -f ~/.cache/pacupdatelive
killall -41 waybar