diff --git a/sysupd b/sysupd index aa055a7..6dec881 100755 --- a/sysupd +++ b/sysupd @@ -2,7 +2,7 @@ # Update Various System Files, Ports, etc. # Copyright (c) 2006-2015, TundraWare Inc, Des Plaines, IL USA # All Rights Reserved -# $Id: sysupd,v 1.151 2015/04/25 19:19:40 tundra Exp $ +# $Id$ ##### @@ -11,6 +11,12 @@ LOGDIR=/var/log +##### +# Some Program Locations Vary By OS +### + +ECHO=$(which echo) + ##### # List Of Sets To Process By Default @@ -24,7 +30,6 @@ DEFAULTSETS=${SYSUPD:-""} # Allow setting this from the environment - # ---------------- Support Functions ---------------- # ##### @@ -35,12 +40,12 @@ timestamp() { - echo "" >> $1 - echo "#####" >> $1 - echo -n "# " >> $1 + ${ECHO} "" >> $1 + ${ECHO} "#####" >> $1 + ${ECHO} -n "# " >> $1 date >>$1 - echo "#####" >> $1 - echo "" >> $1 + ${ECHO} "#####" >> $1 + ${ECHO} "" >> $1 } # End Of 'timestamp()' @@ -87,7 +92,7 @@ for SET in $SETS do - + case $SET in @@ -145,7 +150,7 @@ runupd $SET $LOGDIR "/opt/local/bin/port selfupdate && /opt/local/bin/port upgrade outdated" ;; - + ### # RedHat YUM Updates ### @@ -154,7 +159,7 @@ runupd $SET $LOGDIR "/usr/bin/yum -y upgrade" ;; - + ### # TeX Live Updates ### @@ -163,13 +168,13 @@ runupd $SET $LOGDIR "/usr/local/bin/tlmgr update --self && /usr/local/bin/tlmgr update --all" ;; - + ##### # Catch Errors ##### *) - echo "Invalid sysupd Option Specified!" + ${ECHO} "Invalid sysupd Option Specified!" ;; esac