44 lines
1.0 KiB
Bash
Executable File
44 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
# vim: set sw=4 ts=4 sts=4 et :
|
|
|
|
set -e
|
|
|
|
. "${CONFIGDIR:=${PWD}}"/config
|
|
|
|
mkdir -p "${CONFIGDIR}"/portage/target/etc/portage/repos.conf
|
|
|
|
cat > "${CONFIGDIR}"/portage/target/etc/portage/repos.conf/aimee-os.conf <<EOF
|
|
[aimee-os]
|
|
location = ${PWD}/repos/aimee-os
|
|
auto-sync = no
|
|
EOF
|
|
|
|
cat > "${CONFIGDIR}"/portage/target/etc/portage/repos.conf/x-portage.conf <<EOF
|
|
[x-portage]
|
|
location = ${PWD}/repos/x-portage
|
|
auto-sync = no
|
|
EOF
|
|
|
|
find repos/x-portage \
|
|
-mindepth 1 \
|
|
-maxdepth 1 \
|
|
-type d \
|
|
-not -name metadata \
|
|
-not -name profiles \
|
|
| xargs rm -rfv
|
|
|
|
for patch in patches/ebuilds/*/*/*.patch; do
|
|
[ -f "${patch}" ] || continue
|
|
cp=${patch#patches/ebuilds/}
|
|
cp=${cp%/*.patch}
|
|
printf 'Applying patch %s for %s ...\n' "${patch##*/}" "${cp}"
|
|
if [ ! -d repos/x-portage/${cp} ]; then
|
|
mkdir -p repos/x-portage/${cp}
|
|
cp -r /var/db/repos/gentoo/${cp}/. repos/x-portage/${cp}
|
|
fi
|
|
for f in repos/x-portage/${cp}/*.ebuild; do
|
|
patch "${f}" "${patch}"
|
|
ebuild "${f}" digest
|
|
done
|
|
done
|