]>
git.wh0rd.org - home.git/blob - .bin/gentoo-sync
347713d2f952d52f028b705b2185e5e5e10baba3
3 [ "${FLOCKER}" != "$0" ] && exec env FLOCKER
="$0" flock
-en "$0" "$0" "$@" ||
:
6 sync_log
="${logdir}/rsync.log"
7 up_log
="${logdir}/emerge-updates.log"
15 conf
="/etc/gentoo-sync.conf"
16 [[ -e ${conf} ]] && .
"${conf}"
24 # For slow systems, run rsync directly.
25 for f
in make.globals
make.conf
; do
26 for d
in /etc
/etc
/portage
/usr
/share
/portage
/config
; do
28 [[ -e ${f} ]] && .
${f} && break
32 : ${PORTAGE_RSYNC_OPTS:=-azO --delete --exclude=/distfiles --exclude=/local --exclude=/packages}
33 : ${SYNC:=rsync://rsync.gentoo.org/gentoo-portage}
34 : ${PORTDIR:=/usr/portage}
35 exec rsync
${PORTAGE_RSYNC_OPTS} ${PORTAGE_RSYNC_EXTRA_OPTS} ${SYNC}/ ${PORTDIR}/ >& "${sync_log}"
41 ${GS_EUPDATEDB} && $(type -P eupdatedb)
43 ${GS_LAYMAN} && l=$(type -P layman) && ${l} -S -q
45 ${GS_FETCH} && emerge world -Duf
52 if ${GS_UPWORLD} ; then
54 eval $(portageq envvar -v PORTDIR)
58 for p in `qlist -ICS` ; do
59 if [[ -d ${p%:*} ]] ; then
65 if [[ ${#bad_pkgs[@]} -gt 0 ]] ; then
66 echo 'These packages no longer exist:'
67 printf '\t%s\n' "${bad_pkgs[@]}"
70 echo 'emerge -u1 --keep-going $(awk '\''$2 ~ /\// {print $2}'\'' '${up_log}')'
71 emerge ${good_pkgs[*]} -upq --cols