3 [ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -en "$0" "$0" "$@" || :
6 sync_log="${logdir}/rsync.log"
7 up_log="${logdir}/emerge-updates.log"
14 conf="/etc/gentoo-sync.conf"
15 [[ -e ${conf} ]] && . "${conf}"
23 # For slow systems, run rsync directly.
24 for f in make.globals make.conf ; do
25 for d in /etc /etc/portage /usr/share/portage/config ; do
27 [[ -e ${f} ]] && . ${f} && break
31 : ${PORTAGE_RSYNC_OPTS:=-azO --delete --exclude=/distfiles --exclude=/local --exclude=/packages}
32 : ${SYNC:=rsync://rsync.gentoo.org/gentoo-portage}
33 : ${PORTDIR:=/usr/portage}
34 exec rsync ${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS} ${SYNC}/ ${PORTDIR}/ >& "${sync_log}"
39 ${GS_EUPDATEDB} && $(type -P eupdatedb)
41 ${GS_LAYMAN} && l=$(type -P layman) && ${l} -S -q
43 ${GS_FETCH} && emerge world -Duf
48 if ${GS_UPWORLD} ; then
50 eval $(portageq envvar -v PORTDIR)
52 good_pkgs=$(ls -d `qlist -IC`)
53 echo 'emerge -u1 --keep-going $(awk '\''$2 ~ /\// {print $2}'\'' '${up_log}')'
54 emerge ${good_pkgs} -upq --cols