## Packageprocessing_distissue="`cat /etc/issue`"# FIXME: this should probably be somewhere else as root doesn't read this file. somewhere inside the global bash definitions,## FIXME: make sure this is sourced by a shell _PKGMNGR= if [ $UID != "0" ];then _PKGMNGR="`which sudo` " fi case "$_distissue" in *Fedora*|*fedora*|*FEDORA* ) _PKGMNGR="$_PKGMNGR `which yum` " ;; *suse*|*Suse*|*SuSE*|*SUSE* ) _PKGMNGR="$_PKGMNGR `which zypper`" ;; *debian*|*Debian*|*ubuntu*|*Ubuntu* ) _PKGMNGR="$_PKGMNGR `which aptitude`" ;; * ) _PKGMNGR= ;; esac # ====== DEBUG ============# alias yue="echo $_PKGMNGR" # ============================= ## Define aliases for common commands if a package-manager exists if [ "$_PKGMNGR" != "" ]; then alias yumi="$_PKGMNGR install" alias yup="$_PKGMNGR update" alias yurp="$_PKGMNGR remove" alias yus="$_PKGMNGR search" alias yusi="$_PKGMNGR info" fi unset _PKGMNGR _distissue