From d127365cfac07dff8af75efbed95901d9ff6c0bc Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Mon, 7 Dec 2020 11:07:08 -0500 Subject: Initial commit --- portage | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 portage (limited to 'portage') diff --git a/portage b/portage new file mode 100755 index 0000000..5464937 --- /dev/null +++ b/portage @@ -0,0 +1,51 @@ +#!/bin/sh +. "${0%/*}/common.sh" +if [ "$1" != -p ]; then + cmd cd /usr/portage + cmd git fetch + chks= + d=/home/alex/gentoo-overlay + for chk in $d/*/*; do + f=${chk#$d/} + case "$f" in + metadata/layout.conf|profiles/repo_name) continue + esac + case "$f" in + profiles/*) f=profiles/base/${f#profiles/} + esac + if [ -e "$f" ]; then + chks="$chks $f" + fi + done + cmd git --no-pager log --oneline ..@{u} -- $chks dev-java/openjdk dev-java/openjdk-bin dev-java/openjdk-jre-bin virtual/jdk virtual/jre profiles/base/package.use.mask + stashed= + if [ "$(git status --porcelain | head -c1)" != "" ]; then + cmd git stash + stashed=1 + fi + cmd git rebase @{u} + if [ -n "$stashed" ]; then + cmd git stash pop + fi + cmd sudo emerge --sync + for f in /etc/portage/repo.postsync.d/*; do + if [ -x "$f" ]; then + cmd "$f" gentoo "" /usr/portage + fi + done + cmd mv /var/cache/eix/portage.eix /var/cache/eix/previous.eix + cmd sudo eix-update + cmd sudo eix-diff +fi +if [ "$(eselect news count)" != 0 ]; then + cmd sudo eselect news read + printf 'Press enter to continue...\n' + read REPLY +fi +cmd sudo emerge -uD --changed-use @world +cmd sudo smart-live-rebuild -- --usepkg=n +# needs --usepkg-exclude +#cmd sudo emerge @preserved-rebuild +cmd sudo dispatch-conf +cmd sudo emerge --depclean --deep --verbose=n +cmd sudo revdep-rebuild --ignore --verbose -- --usepkg=n -- cgit v1.2.3-70-g09d2