Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/misc - Fix broken links (ISO web site reorganized). S...
details: https://anonhg.NetBSD.org/src/rev/4bae57aa00ae
branches: trunk
changeset: 781468:4bae57aa00ae
user: ginsbach <ginsbach%NetBSD.org@localhost>
date: Fri Sep 07 21:04:43 2012 +0000
description:
- Fix broken links (ISO web site reorganized). Script now works again.
- Use a few more variables so that it will be easier to change the
next time ISO shuffles the deck.
diffstat:
share/misc/make.country | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diffs (46 lines):
diff -r 9061164ed6af -r 4bae57aa00ae share/misc/make.country
--- a/share/misc/make.country Fri Sep 07 20:27:12 2012 +0000
+++ b/share/misc/make.country Fri Sep 07 21:04:43 2012 +0000
@@ -10,8 +10,7 @@
# <Name><TAB><Alpha-2-code><TAB><Alpha-3-code><TAB><Numeric-3-code><TAB><FIPS>
#
# Further information can be found at the ISO 3166 Maintenance Agency
-# (ISO 3166/MA) web site,
-# <http://www.iso.org/iso/en/prods-services/iso3166ma/index.html>.
+# (ISO 3166/MA) web site, <http://www.iso.org/iso/country_codes>.
#
# FIPS 10-4 codes compiled from several sources, including
# http://www.statoids.com/wab.html
@@ -25,15 +24,17 @@
_EOF
}
-I1=http://www.statoids.com/wab.html
+I1=wab.html
+U1=http://www.statoids.com/$I1
O1=/tmp/wab.$$
-I2=http://www.iso.org/iso/list-en1-semic-3.txt
+I2=country_names_and_code_elements_txt
+U2=http://www.iso.org/iso/$I2
O2=/tmp/list.$$
-trap "rm -f wab.html list-en1-semic-3.txt $O1 $O2" 0 1 2 3 15
-ftp $I1
-ftp $I2
+trap "rm -f $I1 $I2 $O1 $O2" 0 1 2 3 15
+ftp $U1
+ftp $U2
-grep '<tr class="[oe]">' wab.html |
+grep '<tr class="[oe]">' $I1 |
sed -e 's,<tr class="."><td>,,g' \
-e 's,\ ,,g' \
-e 's,<code>,,g' \
@@ -47,7 +48,7 @@
grep -v href= |
sort > $O1
-grep ';[A-Z][A-Z]' list-en1-semic-3.txt |
+grep ';[A-Z][A-Z]' $I2 |
tr -d '\015' |
awk -F ';' '{ print $2 }' |
sort > $O2
Home |
Main Index |
Thread Index |
Old Index