mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2025-04-04 22:01:11 +00:00
Aur now updates too
This commit is contained in:
parent
ffe9452cbe
commit
3f091d45ed
@ -1,7 +1,12 @@
|
|||||||
sudo echo
|
if [ -z "$2" ]; then
|
||||||
|
echo -n Sudo Password:
|
||||||
|
read -s sudoPass
|
||||||
|
else
|
||||||
|
sudoPass=$2
|
||||||
|
fi
|
||||||
mkdir -p ~/AUR
|
mkdir -p ~/AUR
|
||||||
cd ~/AUR
|
cd ~/AUR
|
||||||
git clone https://aur.archlinux.org/"$1".git
|
git clone https://aur.archlinux.org/"$1".git
|
||||||
cd "$1"
|
cd "$1"
|
||||||
echo "cd ..; rm -rf ""$1""" > clean.sh
|
echo "cd --; rm -rf ~/AUR/""$1""" > clean.sh
|
||||||
sudo yes | makepkg -si && ./clean.sh && notify-send """$1"" installed!"
|
echo "$sudoPass" | sudo -S yes | makepkg -si && source clean.sh
|
||||||
|
@ -1,6 +1,26 @@
|
|||||||
|
echo -n Please type your sudo password:
|
||||||
|
read -s sudoPass
|
||||||
|
echo;
|
||||||
|
check_pkgversion() {
|
||||||
|
newver=$(curl -s "https://aur.archlinux.org/rpc.php?type=info&arg=$1" | awk -F : '{print $10}' | awk -F , '{print $1}' | sed 's/"//g')
|
||||||
|
currentver=$(pacman -Qi $1 | awk '{print $3}' | head -n 2 | tail -n 1)
|
||||||
|
if [[ $newver != $currentver ]]; then
|
||||||
|
echo 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo Updating with Pacman...
|
echo Updating with Pacman...
|
||||||
echo
|
echo
|
||||||
pacman -Syu --color always
|
echo "$sudoPass" | sudo -S pacman -Syu --color always
|
||||||
echo
|
echo
|
||||||
yes | pacman -Sc --color always
|
aurpkgs=$(pacman -Qm | awk '{print $1}')
|
||||||
|
for line in $aurpkgs
|
||||||
|
do
|
||||||
|
vcheck=$(check_pkgversion $line)
|
||||||
|
if [[ $vcheck == 1 ]]; then
|
||||||
|
source ~/aur.sh "$line" "$sudoPass"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "$sudoPass" | sudo -S yes | pacman -Sc --color always
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user