add buildPackages.sh
This commit is contained in:
parent
f3002a8cc0
commit
4e4dab39cd
1 changed files with 53 additions and 0 deletions
53
buildPackages.sh
Executable file
53
buildPackages.sh
Executable file
|
@ -0,0 +1,53 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
scriptname="$0"
|
||||||
|
|
||||||
|
function mylog {
|
||||||
|
logger -t $scriptname "${@}"
|
||||||
|
}
|
||||||
|
|
||||||
|
logger "startup"
|
||||||
|
if [[ $(pgrep -f -c $(basename $0)) -gt 1 ]] ; then
|
||||||
|
logger "other instance still running! -> bailing out"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
logger "start syncing"
|
||||||
|
timestamp="$(cat /usr/portage/metadata/timestamp)"
|
||||||
|
chronic /usr/sbin/emaint sync -A
|
||||||
|
#if [[ "$timestamp" == "$(cat /usr/portage/metadata/timestamp)" ]] ; then
|
||||||
|
#nothing changed!
|
||||||
|
# mylog "nothing changed in portage"
|
||||||
|
# exit 0
|
||||||
|
#fi
|
||||||
|
|
||||||
|
declare -Ar CHROOTS=(
|
||||||
|
[server]="/var/lib/buildPackages/packages_amd64"
|
||||||
|
[desktop]="/var/lib/buildPackages/desktop_amd64"
|
||||||
|
)
|
||||||
|
|
||||||
|
declare -Ar SEQUENTIAL=(
|
||||||
|
[desktop]="www-client/chromium dev-qt/qtwebengine net-libs/webkit-gtk"
|
||||||
|
)
|
||||||
|
for identifier in "${!CHROOTS[@]}" ; do
|
||||||
|
# date
|
||||||
|
chroot="${CHROOTS[$identifier]}"
|
||||||
|
mylog "Building packages for $identifier in $chroot"
|
||||||
|
for repo in selba helpers meskal-overlay ; do
|
||||||
|
chronic nice chroot "$chroot" /usr/sbin/emaint sync -r "$repo"
|
||||||
|
done
|
||||||
|
chronic nice chroot "$chroot" /usr/bin/eix-update
|
||||||
|
if [[ -n ${SEQUENTIAL[$identifier]} ]] ; then
|
||||||
|
SEQFLAGS=("--sequentialized" "${SEQUENTIAL[$identifier]}" )
|
||||||
|
else
|
||||||
|
unset SEQFLAGS
|
||||||
|
fi
|
||||||
|
chronic nice chroot "$chroot" "/root/bin/gentooup.sh" "--full" "--batch" "--no-sync" "${SEQFLAGS[@]}"
|
||||||
|
# date
|
||||||
|
mylog "Done building packages for $chroot in ${CHROOTS[$chroot]}"
|
||||||
|
done
|
||||||
|
chmod og+rX -R /usr/portage/packages
|
||||||
|
|
||||||
|
logger "prebuild packages"
|
||||||
|
# Prebuild local packages
|
||||||
|
chronic /root/bin/buildUpgradePackages.sh
|
||||||
|
|
Loading…
Add table
Reference in a new issue