Fix update detection in update_portage.sh
This commit is contained in:
parent
d8b1829787
commit
0d9e8c5f26
@ -113,9 +113,10 @@ trap "cleanup" INT TERM
|
|||||||
mount_overlay
|
mount_overlay
|
||||||
|
|
||||||
# End early if there are no upstream changes
|
# End early if there are no upstream changes
|
||||||
|
# If rsync s executed more than once timestamps differed so we assume updates available
|
||||||
echo 'Syncing gentoo portage tree ...'
|
echo 'Syncing gentoo portage tree ...'
|
||||||
emaint sync -r gentoo 2>/dev/null | grep -q 'You are already up to date'
|
RUNS=$(emaint sync -r gentoo 2>/dev/null | grep -c 'Number of files')
|
||||||
[ $? -eq 0 ] && { echo 'No upstream changes. Exiting.'; cleanup; }
|
[ $RUNS -le 2 ] && { echo 'No upstream changes. Exiting.'; cleanup; }
|
||||||
|
|
||||||
# Optional step to customize the tree, mostly to alter upstream use masks
|
# Optional step to customize the tree, mostly to alter upstream use masks
|
||||||
customize
|
customize
|
||||||
|
Loading…
Reference in New Issue
Block a user