You are not logged in.
Alright, I've got a script I used to use back on ubuntu called sysupdate (See below) Basically it combined
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get auto-remove && sudo apt-get autoclean
down to
sudo sysupdate
Saved time, saved headaches, was just better to use since I knew what it did. And that was great, for Apt.
What I was wonder, is if there was a way for me to distinguish between Arch and ubuntu from Bash, so that I could just copy this script around to all my machines (since some do run non-arch) without having to change it, and then directing the commands as needed.
The script as of right now
#!/bin/bash
# System Wide Update, using apt-get
ROOT_UID=0 # Only users with $UID 0 have root privileges.
E_NOTROOT=87 # Non-root exit error.
# Run as root, of course.
if [ "$UID" -ne "$ROOT_UID" ]
then
echo "Must be root (sudo/su) to run this script."
exit $E_NOTROOT
fi
# Update commands
apt-get update && apt-get dist-upgrade
# Cleans up after itself after update.
apt-get autoremove
apt-get autoclean
It doesn't matter how much training you have. A broken rib is still a broken rib.
Offline
Offline
Falcon.... that is beautiful. I seriously was expecting something A LOT more complex o.0
Thank you!
Edit: Looking back, thats partially what I was after. I was looking for something closer to lsb_release
for example, uname -r tells me the kernel (which in default Arch is actually useful since the kernel ends in "-ARCH") meanwhile Ubuntu implements "lsb_release" so that if a user types in " lsb_release -i -r -s " it will say Ubuntu*9.10 or Ubuntu*10.04 or "lsb_release -cs" will print out the adjective for that release "karmic" for "karmic koala" "lucid" for "lucid lynx" etc etc etc.
I didn't know if there was a universal command across Distros for determining what a user was running
Last edited by FathisAeril (2010-07-22 04:00:47)
It doesn't matter how much training you have. A broken rib is still a broken rib.
Offline
> I didn't know if there was a universal command across Distros for determining what a user was running
http://distrowatch.com/dwres.php?resour … management ?
Offline
is if there was a way for me to distinguish between Arch and ubuntu from Bash.
Ubuntu has /etc/debian_version and Arch has /etc/arch-release .
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
I know I'm hijacking my own, but I didnt want to make a new thread just for thissimple yes / no question.
Does
pacman -Syy
pacman -Qs
still report what packages are available to upgrade? kept meaning to check before doing an upgrade, but it kept slipping my mind.
Im asking because I was working on adding an update notifier to Conky, and I noticed a lot of the posts were from a few years back, meanwhile I know that pacman has changed how it works with Qs
It doesn't matter how much training you have. A broken rib is still a broken rib.
Offline
'pacman -Qs'??
Maybe you mean '-Qu'?
Last edited by karol (2010-07-22 21:43:45)
Offline
lol yeah meant Qu
It doesn't matter how much training you have. A broken rib is still a broken rib.
Offline
lol yeah meant Qu
Yes, it does report.
Offline