Initial commit
This commit is contained in:
commit
8551ee66b4
9
etc/portage/check-portdir.sh
Normal file
9
etc/portage/check-portdir.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/portage/util-functions.sh
|
||||
|
||||
if [[ -z ${PORTDIR} || "$(dirname ${PORTDIR})" == "/" ]] ; then
|
||||
die "PORTDIR empty or pointing to root!"
|
||||
elif [[ ! -e ${PORTDIR} ]] ; then
|
||||
die "${PORTDIR} does not exist!"
|
||||
fi
|
9
etc/portage/postsync.d/sync_cache
Executable file
9
etc/portage/postsync.d/sync_cache
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/portage/check-portdir.sh
|
||||
source /etc/init.d/functions.sh
|
||||
source /etc/portage/util-functions.sh
|
||||
|
||||
einfo "syncing metadata cache"
|
||||
egencache --jobs=8 --repo=gentoo --update --update-use-local-desc || die "egencache failed!"
|
||||
einfo "done syncing metadata cache"
|
19
etc/portage/postsync.d/sync_dtd
Executable file
19
etc/portage/postsync.d/sync_dtd
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/portage/check-portdir.sh
|
||||
source /etc/init.d/functions.sh
|
||||
source /etc/portage/util-functions.sh
|
||||
|
||||
einfo "updating dtd directory"
|
||||
|
||||
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"
|
||||
if [[ -e dtd ]] ; then
|
||||
einfo "dtd dir already exists, updating..."
|
||||
cd glsa || die "could not cd into 'dtd'!"
|
||||
git pull --ff || die "could not pull updates!"
|
||||
else
|
||||
einfo "dtd directory does not exist, cloning..."
|
||||
git clone https://anongit.gentoo.org/git/data/dtd.git || die "could not clone repository!"
|
||||
fi
|
||||
|
||||
einfo "done updating dtd directory"
|
19
etc/portage/postsync.d/sync_glsa
Executable file
19
etc/portage/postsync.d/sync_glsa
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/portage/check-portdir.sh
|
||||
source /etc/init.d/functions.sh
|
||||
source /etc/portage/util-functions.sh
|
||||
|
||||
einfo "updating glsa directory"
|
||||
|
||||
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"
|
||||
if [[ -e glsa ]] ; then
|
||||
einfo "glsa dir already exists, updating..."
|
||||
cd glsa || die "could not cd into 'glsa'!"
|
||||
git pull --ff || die "could not pull updates!"
|
||||
else
|
||||
einfo "glsa directory does not exist, cloning..."
|
||||
git clone https://anongit.gentoo.org/git/data/glsa.git || die "could not clone repository!"
|
||||
fi
|
||||
|
||||
einfo "done updating glsa directory"
|
13
etc/portage/postsync.d/sync_herds_xml
Executable file
13
etc/portage/postsync.d/sync_herds_xml
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/portage/check-portdir.sh
|
||||
source /etc/init.d/functions.sh
|
||||
source /etc/portage/util-functions.sh
|
||||
|
||||
einfo "updating herds.xml"
|
||||
|
||||
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"
|
||||
[[ -e "${PORTDIR}"/metadata/herds.xml ]] && { rm "${PORTDIR}"/metadata/herds.xml || die "failed to rm herds.xml!" ;}
|
||||
wget https://gitweb.gentoo.org/proj/api.git/plain/files/packages/herds.xml || die "failed to wget herds.xml"
|
||||
|
||||
einfo "done updating herds.xml"
|
28
etc/portage/postsync.d/sync_news
Executable file
28
etc/portage/postsync.d/sync_news
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/portage/check-portdir.sh
|
||||
source /etc/init.d/functions.sh
|
||||
source /etc/portage/util-functions.sh
|
||||
|
||||
einfo "updating news items"
|
||||
|
||||
cd "${PORTDIR}"/metadata || die "could not cd into '${PORTDIR}/metadata'!"
|
||||
if [[ -e news ]] ; then
|
||||
einfo "news dir already exists, updating..."
|
||||
cd news || die "could not cd into 'news'!"
|
||||
git pull --ff || die "could not pull updates!"
|
||||
else
|
||||
einfo "glsa directory does not exist, cloning..."
|
||||
git clone https://anongit.gentoo.org/git/proj/gentoo-news.git news || die "could not clone repository!"
|
||||
fi
|
||||
|
||||
cd "${PORTDIR}"/metadata/news || die "failed to cd into ${PORTDIR}/metadata/news"
|
||||
git clean -fdxq || die "failed to clean git repo!"
|
||||
|
||||
if [[ -n "$(find . -mindepth 1 -maxdepth 1 -type d -name "*-*-*")" ]] ; then
|
||||
die "it seems the repository format of proj/gentoo-news has changed! Update your script!"
|
||||
else
|
||||
cp -a */* . || die "could not copy news dirs to base news dir!"
|
||||
fi
|
||||
|
||||
einfo "done updating news items"
|
12
etc/portage/repos.conf/gentoo.conf
Normal file
12
etc/portage/repos.conf/gentoo.conf
Normal file
@ -0,0 +1,12 @@
|
||||
[DEFAULT]
|
||||
main-repo = gentoo
|
||||
|
||||
[gentoo]
|
||||
location = /usr/portage
|
||||
sync-type = git
|
||||
sync-uri = https://github.com/gentoo/gentoo.git
|
||||
auto-sync = yes
|
||||
|
||||
# for daily squashfs snapshots
|
||||
#sync-type = squashdelta
|
||||
#sync-uri = mirror://gentoo/../snapshots/squashfs
|
8
etc/portage/util-functions.sh
Normal file
8
etc/portage/util-functions.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
source /etc/init.d/functions.sh
|
||||
|
||||
die() {
|
||||
eerror "$*"
|
||||
exit 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user