PC : できましたー。名前と内容が既に違います。うーん。メンテしたくありません。うーん。 こんなに短いのに。
--- showversionindex.sh 16 Aug 2006 11:33:22 -0000 1.3 +++ showversionindex.sh 17 Aug 2006 23:57:34 -0000 1.4 @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: showversionindex.sh,v 1.3 2006/08/16 11:33:22 xxxx Exp $ +# $Id: showversionindex.sh,v 1.4 2006/08/17 23:57:34 xxxx Exp $ export LANG="C" export PORTS_DIR="/usr/ports" @@ -21,15 +21,15 @@ | awk '{ print $2 }'` if [ "x${TARGET}" != "x" ] ; then - TARGET=`echo "${TARGET}" | sed 's/${PORTS_DIR}\//g'` + TARGET=`echo "${TARGET}" | sed "s#${PORTS_DIR}/##g"` for p in ${TARGET} do FN=`basename "${p}"` - TAR_URL=`echo "$TAR_URL" | sed "s/%TARGET%/${p}/"` - TAR_URL=`echo "$TAR_URL" | sed "s/%FN%/${FN}/"` + TAR_URL=`echo "$TAR_URL" | sed "s#%TARGET%#${p}#"` + TAR_URL=`echo "$TAR_URL" | sed "s#%FN%#${FN}#"` - fetch "$TAR_URL" 2>&1 > /dev/null \ + fetch -o "${FN}.tar.gz" "$TAR_URL" 2>&1 > /dev/null \ || echo "Can't fetch ${TARGET}" >&2 done fi