mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-26 04:33:09 +02:00
dsv: remove unnecessary double quotes in assignments
- dsv: change foo="$bar" to foo=$bar - dsv: change foo="`bar`" to foo=`bar` (and variations thereof)
This commit is contained in:
parent
4ae9a0940c
commit
3b3c4bf056
16
dsv/dsv
16
dsv/dsv
@ -40,9 +40,9 @@ usage()
|
|||||||
|
|
||||||
up()
|
up()
|
||||||
{
|
{
|
||||||
old="`pwd`"
|
old=`pwd`
|
||||||
cd ..
|
cd ..
|
||||||
new="`pwd`"
|
new=`pwd`
|
||||||
[ "$old" != "$new" ]
|
[ "$old" != "$new" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ flush()
|
|||||||
echo "$name: no URL" 2>&1
|
echo "$name: no URL" 2>&1
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
ds="$name-`basename "$url"`"
|
ds=$name-`basename "$url"`
|
||||||
mkdir -p $DSV_DIR
|
mkdir -p $DSV_DIR
|
||||||
if [ ! -r "$DSV_DIR/$ds" ]; then
|
if [ ! -r "$DSV_DIR/$ds" ]; then
|
||||||
wget -nv -O "$DSV_DIR/$ds" "$url"
|
wget -nv -O "$DSV_DIR/$ds" "$url"
|
||||||
@ -73,9 +73,9 @@ set_value()
|
|||||||
{
|
{
|
||||||
case "$tag" in
|
case "$tag" in
|
||||||
N:|n:) flush
|
N:|n:) flush
|
||||||
name="$value";;
|
name=$value;;
|
||||||
A:|a:) alias="$alias $value";;
|
A:|a:) alias="$alias $value";;
|
||||||
D:|d:) url="$value";;
|
D:|d:) url=$value;;
|
||||||
"")
|
"")
|
||||||
;; # first iteration
|
;; # first iteration
|
||||||
*) echo "unrecognized tag \"$tag\"" 2>&1
|
*) echo "unrecognized tag \"$tag\"" 2>&1
|
||||||
@ -102,13 +102,13 @@ setup()
|
|||||||
while read line; do
|
while read line; do
|
||||||
[ "$line" = "${line###}" ] || continue
|
[ "$line" = "${line###}" ] || continue
|
||||||
tmp=`echo "$line" | awk '/^[^\t ]/ { print $1 }'`
|
tmp=`echo "$line" | awk '/^[^\t ]/ { print $1 }'`
|
||||||
tail="`echo "$line" | sed 's/^[^\t ]*[\t ]*//'`"
|
tail=`echo "$line" | sed 's/^[^\t ]*[\t ]*//'`
|
||||||
if [ -z "$tmp" ]; then
|
if [ -z "$tmp" ]; then
|
||||||
[ -z "$tail" ] || value="$value $tail"
|
[ -z "$tail" ] || value="$value $tail"
|
||||||
else
|
else
|
||||||
set_value
|
set_value
|
||||||
tag=$tmp
|
tag=$tmp
|
||||||
value="$tail"
|
value=$tail
|
||||||
fi
|
fi
|
||||||
done <"$n"
|
done <"$n"
|
||||||
set_value
|
set_value
|
||||||
@ -133,7 +133,7 @@ search()
|
|||||||
while true; do
|
while true; do
|
||||||
if [ -d $DSV_DIR ]; then
|
if [ -d $DSV_DIR ]; then
|
||||||
if [ -r "$DSV_DIR/dsv-$1" ]; then
|
if [ -r "$DSV_DIR/dsv-$1" ]; then
|
||||||
file="`cat $DSV_DIR/dsv-$1`"
|
file=`cat $DSV_DIR/dsv-$1`
|
||||||
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" 2>&1
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user