log buildUpgradePackages to syslog
This commit is contained in:
parent
cf84281d6c
commit
483be827ce
1 changed files with 12 additions and 1 deletions
|
@ -2,11 +2,20 @@
|
||||||
|
|
||||||
. /etc/portage/make.conf
|
. /etc/portage/make.conf
|
||||||
|
|
||||||
|
script="$0"
|
||||||
|
|
||||||
|
function mylog() {
|
||||||
|
logger -t "$script" "${*}"
|
||||||
|
}
|
||||||
|
|
||||||
|
mylog "testing if other instances are running"
|
||||||
|
|
||||||
if [[ $(pgrep -f -c $(basename $0)) -gt 1 ]] ; then
|
if [[ $(pgrep -f -c $(basename $0)) -gt 1 ]] ; then
|
||||||
# echo other instance still running
|
mylog "other instance still running"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mylog "start building packages"
|
||||||
for atom in $(emerge -uDN --pretend --quiet world | grep ^'\[ebuild' | sed -e 's/.* \b\([a-z0-9\-]\+\/[\_A-Za-z\.0-9\-]\+\)\b.*/\1/g');
|
for atom in $(emerge -uDN --pretend --quiet world | grep ^'\[ebuild' | sed -e 's/.* \b\([a-z0-9\-]\+\/[\_A-Za-z\.0-9\-]\+\)\b.*/\1/g');
|
||||||
do
|
do
|
||||||
PACKAGE_FILE="$PKGDIR/$atom.tbz2"
|
PACKAGE_FILE="$PKGDIR/$atom.tbz2"
|
||||||
|
@ -27,9 +36,11 @@ done
|
||||||
if [[ -n "${SUCCESS}" ]]
|
if [[ -n "${SUCCESS}" ]]
|
||||||
then
|
then
|
||||||
echo "Successfully build: ${SUCCESS}"
|
echo "Successfully build: ${SUCCESS}"
|
||||||
|
mylog "Successfully build: ${SUCCESS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${FAILURE}" ]]
|
if [[ -n "${FAILURE}" ]]
|
||||||
then
|
then
|
||||||
echo "Build Failures: ${FAILURE}"
|
echo "Build Failures: ${FAILURE}"
|
||||||
|
mylog "Build Failures: ${FAILURE}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue