diff options
Diffstat (limited to 'portage-update.sh')
-rwxr-xr-x | portage-update.sh | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/portage-update.sh b/portage-update.sh index a1d9ceb..5b08fb6 100755 --- a/portage-update.sh +++ b/portage-update.sh @@ -18,9 +18,7 @@ SAFE_SERVICES="cupsd fail2ban lvmetad ntpd proftpd smartd sshd tor syslog-ng" while test $# -gt 0 do case "$1" in - --skip-sync) export SKIP_SYNC="true" # In case we don't want to --sync the Portage tree - ;; - --skip-layman-sync) export SKIP_LAYMAN_SYNC="true" # In case we don't want to --sync-all Layman repos + --skip-sync) export SKIP_SYNC="true" # In case we don't want to sync repositories ;; --skip-news) export SKIP_NEWS="true" # In case we don't want to read new news before continuing ;; @@ -38,19 +36,10 @@ do shift done -# Sync the Portage tree, unless skipped +# Sync all repositories configured with auto-sync, unless skipped if [ -z ${SKIP_SYNC+x} ]; then - echo 'emerge --sync' - emerge --sync || exit 1 -fi - -# Sync Layman repos, unless skipped -if [ -z ${SKIP_LAYMAN_SYNC+x} ]; then - echo 'layman -S' - # Only try to run layman if the command seems to exist - if command -v layman > /dev/null; then - layman -S || exit 1 - fi + echo 'emaint sync --auto' + emaint sync --auto || (echo "$0: error: failed to sync repositories" ; echo exit 1) fi # Check to see if there's any news, unless skipped |