summaryrefslogtreecommitdiffstats
path: root/scripts/bootstrap/layman_reinit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bootstrap/layman_reinit.sh')
-rw-r--r--scripts/bootstrap/layman_reinit.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/bootstrap/layman_reinit.sh b/scripts/bootstrap/layman_reinit.sh
index ce88379..6f977c7 100644
--- a/scripts/bootstrap/layman_reinit.sh
+++ b/scripts/bootstrap/layman_reinit.sh
@@ -1,12 +1,14 @@
#! /bin/bash
(
- repos=$(xmllint -xpath "//repo/name/text()|//repo/source/text()" /etc/portage/layman.xml | xargs -n2)
-
+ repos=$(xmllint -xpath "//repo/name/text()|//repo/source/text()" /etc/portage/layman.xml | xargs -n2) #"
+ repos_enabled=$(cat /etc/portage/repos.conf/layman.conf | grep -oP "\[\K[^]]*")
+
cd /etc/portage
layman -d ALL
- for repo in $(cat /etc/portage/repos.conf/layman.conf | grep -oP "\[\K[^]]*"); do
+ layman -L &> /dev/null
+ for repo in "$repos_enabled"; do
repo_src=$(echo "$repos" | grep -P "^$repo" | awk '{ print $2 }')
if [ -n "$repo_src" ]; then
layman -a "$repo" -O "$repo_src"
@@ -16,4 +18,5 @@
done
git checkout -- layman.xml
+ git checkout -- repos.conf/layman.conf
)