diff options
Diffstat (limited to 'scripts/keywordsgen.sh')
-rw-r--r-- | scripts/keywordsgen.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/keywordsgen.sh b/scripts/keywordsgen.sh new file mode 100644 index 0000000..47ce0df --- /dev/null +++ b/scripts/keywordsgen.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +# Unlock last version of virtual/perl packages (helps if we upgrading to current unstable release) +( + cd /usr/portage + + rm /etc/portage/package.keywords/xdeps-perl530.xgen.keywords + for p in virtual/perl-*; do + ( + name=$(basename "$p") + #cd "$p" + + regexp=$(echo "${p}/${name}-" | sed "s/\+/\\\\+/g") + + latest=$(ls "${p}/${name}"*.ebuild | sed -r "s#${regexp}##" | sort -V | tail -n 1) + + ebuild="${p}/${name}-${latest}" + category=$(echo "$p" | awk -F '/' '{ print $1 }') + package=$(basename $ebuild .ebuild) + + (cat $ebuild | grep perl-5.30 &> /dev/null) && echo "=$category/$package ~amd64" >> /etc/portage/package.keywords/xdeps-perl530.xgen.keywords + ) + done +) |