=================================================================== RCS file: /cvs/openbsd/update_openbsd/update_openbsd,v retrieving revision 1.95 retrieving revision 1.96 diff -u -r1.95 -r1.96 --- openbsd/update_openbsd/update_openbsd 2017/12/10 21:19:11 1.95 +++ openbsd/update_openbsd/update_openbsd 2017/12/10 21:20:53 1.96 @@ -1,5 +1,5 @@ #!/bin/sh -# $AFresh1: update_openbsd,v 1.94 2017/12/10 21:16:05 andrew Exp $ +# $AFresh1: update_openbsd,v 1.95 2017/12/10 21:19:11 andrew Exp $ # # Copyright (c) 2012 Andrew Fresh # @@ -61,18 +61,14 @@ _file=`echo ${_list} | awk '/base[0-9][0-9].tgz/ { print $9 }'` elif [ X"http" == X"${_proto}" -o X"https" == X"${_proto}" ]; then - local _list=`${FTP_CMD} -V -o - ${FTP}/` - _file=`echo ${_list} | awk '/[^x]base[0-9][0-9]*\.tgz/ { - sub("^.*base","base"); - sub("\.tgz.*",".tgz"); - print $0; - }'` + _file=`${FTP_CMD} -V -o - ${FTP}/index.txt | + sed -ne 's/.*\(base[0-9][0-9].tgz\).*/\1/p'` elif [ X"scp" == X"${_proto}" ]; then echo SCP is not yet supported >&2 return 2 - else + else echo Unsupported FTP ${FTP} >&2 return 2