1
0
Fork 0

Make early end in update_portage.sh fail safe.

This commit is contained in:
Stefan Reimer 2016-05-20 18:35:31 -07:00
parent 0d9e8c5f26
commit 1032a2e63b
1 changed files with 2 additions and 2 deletions

View File

@ -113,10 +113,10 @@ trap "cleanup" INT TERM
mount_overlay
# End early if there are no upstream changes
# If rsync s executed more than once timestamps differed so we assume updates available
# assume if rsync is run only once that no upstream changes available
echo 'Syncing gentoo portage tree ...'
RUNS=$(emaint sync -r gentoo 2>/dev/null | grep -c 'Number of files')
[ $RUNS -le 2 ] && { echo 'No upstream changes. Exiting.'; cleanup; }
[ $RUNS -eq 1 ] && { echo 'No upstream changes. Exiting.'; cleanup; }
# Optional step to customize the tree, mostly to alter upstream use masks
customize