You are not logged in.
Like the title says, this is my first attempt at a bash script.
I wrote it to make it a tiny bit easier for my wife to keep her system up to date without needing to remember the terminal commands. She runs it via an entry in her openbox menu.
It calls on reflector to check all available mirrors for the most up to date and then use rankmirrors to find the fastest 5 and write them to /etc/pacmand.d/mirrorlist
Finally, it syncs and upgrades via the command pacman -Syyu
#!/bin/bash
# runs reflector to optimize mirrors
echo "I'm afraid I can't do that Dave"
sudo reflector -l 5 -r -o /etc/pacman.d/mirrorlist
echo " I hope you trust me..."
echo " "
sleep 2s
# updates system
sudo pacman -Syyu
Offline
I'd run the script as root and cut out the sudo calls. Also using rebase instead of the pacman call there wouldn't be bad. If you just want a newline, then "echo" by itself will do that.
[git] | [AURpkgs] | [arch-games]
Offline
I've scavenged some code to take care of the root thing, but why rebase vs pacman? After reading up on rebase a bit, I'm not quite sure how to use it to complete the upgrade once it's updated everything.
Offline