Last active
August 29, 2015 14:08
-
-
Save ZiTAL/e78641e956d9a28a1536 to your computer and use it in GitHub Desktop.
debian apt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# /usr/local/bin/apt | |
user=`whoami` | |
commands="apt-get clean; apt-get update; aptitude upgrade; aptitude dist-upgrade" | |
if [ $user != "root" ]; then | |
su root -c "${commands}" | |
else | |
eval $commands | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment