diff --git a/src/pkg/deps.bash b/src/pkg/deps.bash index 5760453c9e..598c167661 100755 --- a/src/pkg/deps.bash +++ b/src/pkg/deps.bash @@ -21,14 +21,16 @@ dirpat=$(echo $dirs C | awk '{ gsub("/", "\\/", x) printf("/^(%s)$/\n", x) } -}' - # Add packages' old names. TODO: clean up after renaming. - echo "/^(asn1)$/" - echo "/^(csv)$/" - echo "/^(gob)$/" - echo "/^(json)$/" - echo "/^(xml)$/" -) +}') + +# Append old names of renamed packages. TODO: clean up after renaming. +dirpat="$dirpat +/^(asn1)$/ +/^(csv)$/ +/^(gob)$/ +/^(json)$/ +/^(xml)$/ +" for dir in $dirs; do ( cd $dir >/dev/null || exit 1 @@ -47,15 +49,12 @@ for dir in $dirs; do ( grep -v "^$dir\$" | sed 's/$/.install/' | # TODO: rename the dependencies for renamed directories. TODO: clean up after renaming. - # awk is overkill but it's easy to understand. - awk ' - /^asn1.install$/ { print "encoding/asn1.install"; next } - /^csv.install$/ { print "encoding/csv.install"; next } - /^gob.install$/ { print "encoding/gob.install"; next } - /^json.install$/ { print "encoding/json.install"; next } - /^xml.install$/ { print "encoding/xml.install"; next } - {print} - ' | + sed 's;^asn1.install$;encoding/asn1.install;' | + sed 's;^csv.install$;encoding/csv.install;' | + sed 's;^gob.install$;encoding/gob.install;' | + sed 's;^json.install$;encoding/json.install;' | + sed 's;^xml.install$;encoding/xml.install;' | + # TODO: end of renamings. sed 's;^C\.install;runtime/cgo.install;' | sort -u )