File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1414_append=" "
1515RCV=` command -v xbps-checkvers 2> /dev/null`
1616RCV_F=" repo-checkvers.txt"
17- RCV_FPV=" repo-checkvers-pkgver.txt"
1817RCV_FR=" repo-checkvers-remove.txt"
1918TOBUILD=
2019_TOBUILD=
2120USAGE=" Usage: $0 [-a cross-arch] [-CN] [-R repo] [-d|-m|-h dir]"
21+ declare -A PKGVER_ASSOC
2222
2323[ -f $RCV ] || {
2424 printf " ERROR: The 'xbps-checkvers' was not found in the PATH.\n"
@@ -128,7 +128,9 @@ case "$?" in
128128 grep pkgname " $RCV_F " | awk ' { print $2 }' > pkgs.txt ;;
1291291) # version >= 0.54
130130 cut -d' ' -f1 " $RCV_F " > pkgs.txt
131- cut -d' ' -f1-2 " $RCV_F " > " $RCV_FPV "
131+ while read -r pkgname version remainder; do
132+ PKGVER_ASSOC[$pkgname ]=$version
133+ done < " $RCV_F "
132134 ;;
133135* )
134136 echo " ERROR: couldn't determine xbps-checkvers version"
@@ -155,7 +157,7 @@ for p in `cat pkgs.txt`; do
155157 touch tobuild/$p
156158 ;;
157159 2)
158- version=" $( grep " ^ $p " < $RCV_FPV | tail -n 1 | cut -d ' ' -f2 ) "
160+ version=${PKGVER_ASSOC[$p]}
159161 TOREMOVE+=" $p -$version "
160162 TOREMOVE+=" $p -dbg-$version "
161163 [ " $XBPS_ARCH " = i686 ] && TOREMOVE32BIT+=" $p -32bit-$version "
You can’t perform that action at this time.
0 commit comments