1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-25 22:55:20 +02:00

dsv/dsv: to print to stderr, it's 1>&2 and not 2>&1, stupid ...

This commit is contained in:
Werner Almesberger 2014-12-24 17:35:08 -03:00
parent c07e33bec6
commit 1a8beb2f15

24
dsv/dsv
View File

@ -30,13 +30,13 @@ DSV_DIR=.dsv
usage()
{
echo "usage: $0 [-p] [-u] <component>" 2>&1
echo " $0 help" 2>&1
echo " $0 [ls]" 2>&1
echo " $0 setup <info-file> ..." 2>&1
echo 2>&1
echo " -p show the path instead of displaying the file " 2>&1
echo " -u show source URL instead of displaying the file " 2>&1
echo "usage: $0 [-p] [-u] <component>" 1>&2
echo " $0 help" 1>&2
echo " $0 [ls]" 1>&2
echo " $0 setup <info-file> ..." 1>&2
echo 1>&2
echo " -p show the path instead of displaying the file " 1>&2
echo " -u show source URL instead of displaying the file " 1>&2
exit 1
}
@ -62,7 +62,7 @@ flush()
nm=`echo "$nm" | sed 's/%/%25/g;s|/|%2F|g'`
[ -z "$nm" ] && return
if [ -z "$url" ]; then
echo "$nm: no URL" 2>&1
echo "$nm: no URL" 1>&2
exit 1
fi
ds=$nm-`basename "$url"`
@ -110,7 +110,7 @@ set_value()
D:|d:) url=$value;;
Z:|z:) zip=$value;;
"") ;; # first iteration
*) echo "unrecognized tag \"$tag\"" 2>&1
*) echo "unrecognized tag \"$tag\"" 1>&2
exit 1;;
esac
value=
@ -128,7 +128,7 @@ setup()
{
for n in "$@"; do
if [ ! -r "$n" ]; then
echo "$n: not found" 2>&1
echo "$n: not found" 1>&2
continue
fi
#
@ -183,7 +183,7 @@ search()
if [ -r "$DSV_DIR/dsv-$name" ]; then
file=`sed 1q "$DSV_DIR/dsv-$name"`
if [ ! -r "$DSV_DIR/$file" ]; then
echo "$1 -> $file: does not exist" 2>&1
echo "$1 -> $file: does not exist" 1>&2
exit 1
fi
if $path; then
@ -206,7 +206,7 @@ search()
fi
fi
if ! up; then
echo "no data sheet found for \"$1\"" 2>&1
echo "no data sheet found for \"$1\"" 1>&2
exit 1
fi
done