mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-22 21:23:10 +02:00
dsv/dsv: to print to stderr, it's 1>&2 and not 2>&1, stupid ...
This commit is contained in:
parent
c07e33bec6
commit
1a8beb2f15
24
dsv/dsv
24
dsv/dsv
@ -30,13 +30,13 @@ DSV_DIR=.dsv
|
|||||||
|
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
echo "usage: $0 [-p] [-u] <component>" 2>&1
|
echo "usage: $0 [-p] [-u] <component>" 1>&2
|
||||||
echo " $0 help" 2>&1
|
echo " $0 help" 1>&2
|
||||||
echo " $0 [ls]" 2>&1
|
echo " $0 [ls]" 1>&2
|
||||||
echo " $0 setup <info-file> ..." 2>&1
|
echo " $0 setup <info-file> ..." 1>&2
|
||||||
echo 2>&1
|
echo 1>&2
|
||||||
echo " -p show the path instead of displaying the file " 2>&1
|
echo " -p show the path instead of displaying the file " 1>&2
|
||||||
echo " -u show source URL instead of displaying the file " 2>&1
|
echo " -u show source URL instead of displaying the file " 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ flush()
|
|||||||
nm=`echo "$nm" | sed 's/%/%25/g;s|/|%2F|g'`
|
nm=`echo "$nm" | sed 's/%/%25/g;s|/|%2F|g'`
|
||||||
[ -z "$nm" ] && return
|
[ -z "$nm" ] && return
|
||||||
if [ -z "$url" ]; then
|
if [ -z "$url" ]; then
|
||||||
echo "$nm: no URL" 2>&1
|
echo "$nm: no URL" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
ds=$nm-`basename "$url"`
|
ds=$nm-`basename "$url"`
|
||||||
@ -110,7 +110,7 @@ set_value()
|
|||||||
D:|d:) url=$value;;
|
D:|d:) url=$value;;
|
||||||
Z:|z:) zip=$value;;
|
Z:|z:) zip=$value;;
|
||||||
"") ;; # first iteration
|
"") ;; # first iteration
|
||||||
*) echo "unrecognized tag \"$tag\"" 2>&1
|
*) echo "unrecognized tag \"$tag\"" 1>&2
|
||||||
exit 1;;
|
exit 1;;
|
||||||
esac
|
esac
|
||||||
value=
|
value=
|
||||||
@ -128,7 +128,7 @@ setup()
|
|||||||
{
|
{
|
||||||
for n in "$@"; do
|
for n in "$@"; do
|
||||||
if [ ! -r "$n" ]; then
|
if [ ! -r "$n" ]; then
|
||||||
echo "$n: not found" 2>&1
|
echo "$n: not found" 1>&2
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
@ -183,7 +183,7 @@ search()
|
|||||||
if [ -r "$DSV_DIR/dsv-$name" ]; then
|
if [ -r "$DSV_DIR/dsv-$name" ]; then
|
||||||
file=`sed 1q "$DSV_DIR/dsv-$name"`
|
file=`sed 1q "$DSV_DIR/dsv-$name"`
|
||||||
if [ ! -r "$DSV_DIR/$file" ]; then
|
if [ ! -r "$DSV_DIR/$file" ]; then
|
||||||
echo "$1 -> $file: does not exist" 2>&1
|
echo "$1 -> $file: does not exist" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if $path; then
|
if $path; then
|
||||||
@ -206,7 +206,7 @@ search()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if ! up; then
|
if ! up; then
|
||||||
echo "no data sheet found for \"$1\"" 2>&1
|
echo "no data sheet found for \"$1\"" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user