summaryrefslogtreecommitdiff
path: root/portage-update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'portage-update.sh')
-rwxr-xr-xportage-update.sh28
1 files changed, 18 insertions, 10 deletions
diff --git a/portage-update.sh b/portage-update.sh
index 7c92bbd..19c5727 100755
--- a/portage-update.sh
+++ b/portage-update.sh
@@ -18,14 +18,18 @@ SAFE_SERVICES="cupsd lvmetad ntpd smartd sshd tor syslog-ng vixie-cron webmin"
while test $# -gt 0
do
case "$1" in
+ --skip-sync) export SKIP_SYNC="true" # In case we don't to --sync the Portage tree
+ ;;
+ --skip-layman-sync) export SKIP_LAYMAN_SYNC="true" # In case we don't to --sync-all Layman
+ ;;
+ --skip-news) export SKIP_NEWS="true" # In case we don't to read new news before continuing
+ ;;
--skip-update) export SKIP_UPDATE="true" # In case we don't want to do the actual "emerge --update"
;;
--skip-depclean) export SKIP_DEPCLEAN="true" # In case we don't want to do an "emerge --depclean"
;;
--skip-preserved-rebuild) export SKIP_PRESERVED_REBUILD="true" # In case we don't want to do an "emerge @preserved-rebuild"
;;
- --skip-news) export SKIP_NEWS="true" # In case we don't to read new news before continuing
- ;;
--*) echo "bad argument '$1'" ; exit 1
;;
*) echo "unexpected argument '$1'" ; exit 1
@@ -34,15 +38,19 @@ do
shift
done
-# Sync the Portage tree
-echo 'emerge --sync'
-emerge --sync || exit 1
+# Sync the Portage tree, unless skipped
+if [ -z ${SKIP_SYNC+x} ]; then
+ echo 'emerge --sync'
+ emerge --sync || exit 1
+fi
-# Sync Layman repos
-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
+# 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
fi
# Check to see if there's any news, unless skipped