aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@riseup.net>2021-04-02 09:23:09 +0200
committerAndrew Ammerlaan <andrewammerlaan@riseup.net>2021-04-02 11:52:30 +0200
commite19e4730a005e718d8b8617c07bafca7e4e68346 (patch)
treef8316914f929b5923a12169a1a21f619e2a9fff7 /scripts
parent.github/workflows/repoman.yml: Use script to auto run the latest rm (diff)
downloadguru-e19e4730a005e718d8b8617c07bafca7e4e68346.tar.gz
guru-e19e4730a005e718d8b8617c07bafca7e4e68346.tar.bz2
guru-e19e4730a005e718d8b8617c07bafca7e4e68346.zip
.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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/setup-master-gentoo.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/setup-master-gentoo.sh b/scripts/setup-master-gentoo.sh
new file mode 100755
index 000000000..a2939721a
--- /dev/null
+++ b/scripts/setup-master-gentoo.sh
@@ -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