.github/workflows/*: reduce code-duplication

Reduce code duplication by moving the ::gentoo setup part
into a seperate script. This way only one file has to be
edited when e.g. updating the profile to a new version

Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
This commit is contained in:
Andrew Ammerlaan
2021-04-02 09:23:09 +02:00
parent 292e03dc22
commit e19e4730a0
3 changed files with 12 additions and 10 deletions

10
scripts/setup-master-gentoo.sh Executable file
View File

@@ -0,0 +1,10 @@
#! /usr/bin/env bash
# Maintainer: Andrew Ammerlaan <andrewammerlaan@riseup.net>
#
# Fetch and setup the latest ::gentoo
sudo mkdir -p /var/db/repos/gentoo /etc/portage /var/cache/distfiles
wget -qO - "https://github.com/gentoo-mirror/gentoo/archive/master.tar.gz" | sudo tar xz -C /var/db/repos/gentoo --strip-components=1
sudo wget "https://www.gentoo.org/dtd/metadata.dtd" -O /var/cache/distfiles/metadata.dtd
sudo wget "https://gitweb.gentoo.org/proj/portage.git/plain/cnf/repos.conf" -O /etc/portage/repos.conf
sudo ln -s /var/db/repos/gentoo/profiles/default/linux/amd64/17.1 /etc/portage/make.profile