51 |
fi |
fi |
52 |
|
|
53 |
# sanity checks |
# sanity checks |
54 |
for cmd in sed awk zcat ls grep egrep wc expr fgrep sort tr cut |
for cmd in sed awk zcat ls grep wc expr sort tr cut |
55 |
do |
do |
56 |
if [[ -z $(type -P ${cmd}) ]] |
if [[ -z $(type -P ${cmd}) ]] |
57 |
then |
then |
135 |
### then generate entries for those in the same way, putting the info for |
### then generate entries for those in the same way, putting the info for |
136 |
### those at the end.... |
### those at the end.... |
137 |
|
|
138 |
infofiles=$(cd ${INFODIR}; /bin/ls | grep -v '\-[0-9]*\.gz$' | grep -v '\-[0-9]*$' | egrep -v '^dir$|^dir\.info$|^dir\.orig$') |
infofiles=$(cd ${INFODIR}; /bin/ls | grep -v '\-[0-9]*\.gz$' | grep -v '\-[0-9]*$' | grep -E -v '^dir$|^dir\.info$|^dir\.orig$') |
139 |
|
|
140 |
# echoing gets clobbered by backquotes; we do it the hard way... |
# echoing gets clobbered by backquotes; we do it the hard way... |
141 |
lines=$(wc ${SKELETON} | awk '{print $1}') |
lines=$(wc ${SKELETON} | awk '{print $1}') |
243 |
|
|
244 |
# Sort remaining files by INFO-DIR-SECTION. |
# Sort remaining files by INFO-DIR-SECTION. |
245 |
prevsect= |
prevsect= |
246 |
filesectdata=$(cd ${INFODIR}; fgrep INFO-DIR-SECTION /dev/null ${infofiles} | fgrep -v 'INFO-DIR-SECTION Miscellaneous' | sort -t: -k2 -k1 | tr ' ' '_') |
filesectdata=$(cd ${INFODIR}; grep -F INFO-DIR-SECTION /dev/null ${infofiles} | grep -F -v 'INFO-DIR-SECTION Miscellaneous' | sort -t: -k2 -k1 | tr ' ' '_') |
247 |
for sectdata in ${filesectdata} |
for sectdata in ${filesectdata} |
248 |
do |
do |
249 |
file=$(echo ${sectdata} | cut -d: -f1) |
file=$(echo ${sectdata} | cut -d: -f1) |