summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-01 01:29:17 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-01 01:29:17 +0200
commit016f9ba4fa9664300edeebc2f8f396cf023d5390 (patch)
treec57cd669803501a99f5a6c48f6e68334a6a07b63
parenta65745f33edcaac9c7d87e730c41a733c4a6c135 (diff)
downloadgentoo-016f9ba4fa9664300edeebc2f8f396cf023d5390.tar.gz
gentoo-016f9ba4fa9664300edeebc2f8f396cf023d5390.tar.bz2
gentoo-016f9ba4fa9664300edeebc2f8f396cf023d5390.tar.xz
gentoo-016f9ba4fa9664300edeebc2f8f396cf023d5390.zip
Layman script
-rw-r--r--layman.xml13
-rw-r--r--repos.conf/layman.conf6
-rw-r--r--scripts/layman.sh13
3 files changed, 14 insertions, 18 deletions
diff --git a/layman.xml b/layman.xml
index 2092af5..6d2f000 100644
--- a/layman.xml
+++ b/layman.xml
@@ -1,5 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<repositories encoding="UTF-8" version="1.0">
+<repositories encoding="unicode" version="1.0">
<repo priority="50" quality="experimental" status="official">
<name>nx</name>
<description>Overlay for the NX/FreeNX packages for Gentoo.</description>
@@ -22,14 +21,4 @@
<feed>https://cgit.gentoo.org/proj/sci.git/atom/</feed>
<feed>https://github.com/gentoo-science/sci/commits/master.atom</feed>
</repo>
- <repo priority="50" quality="experimental" status="unofficial">
- <name>pypi</name>
- <description>python packages</description>
- <homepage>https://pypi.python.org/pypi</homepage>
- <owner>
- <email>jauhien@gentoo.org</email>
- <name>Jauhien Piatlicki</name>
- </owner>
- <source type="g-sorcery">gs-pypi pypi</source>
- </repo>
</repositories>
diff --git a/repos.conf/layman.conf b/repos.conf/layman.conf
index 8b9b9f2..1b2f2e8 100644
--- a/repos.conf/layman.conf
+++ b/repos.conf/layman.conf
@@ -4,9 +4,3 @@ location = /var/lib/layman/nx
layman-type = git
auto-sync = No
-[pypi]
-priority = 50
-location = /var/lib/layman/pypi
-layman-type = g-sorcery
-auto-sync = No
-
diff --git a/scripts/layman.sh b/scripts/layman.sh
new file mode 100644
index 0000000..1eb7904
--- /dev/null
+++ b/scripts/layman.sh
@@ -0,0 +1,13 @@
+#! /bin/bash
+
+repos=$(xmllint -xpath "//repo/name/text()|//repo/source/text()" /etc/portage/layman.xml | xargs -n2)
+
+layman -d ALL
+git checkout -- /etc/portage/repos.conf/layman.conf
+
+for repo in $(cat /etc/portage/repos.conf/layman.conf | grep -oP "\[\K[^]]*"); do
+ repo_src=$(echo "$repos" | grep -P "^$repo" | awk '{ print $2 }')
+ layman -a "$repo_src"
+done
+
+git checkout -- /etc/portage/repos.conf/layman.conf