1
0
mirror of https://github.com/golang/go synced 2024-11-20 04:44:40 -07:00

deps.bash: attempt to fix the windows build

Use simpler shell constructs.

R=golang-dev
CC=golang-dev
https://golang.org/cl/5297080
This commit is contained in:
Rob Pike 2011-11-03 12:19:07 -07:00
parent f4cd80224a
commit d615a5255d

View File

@ -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
)