mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-25 22:55:20 +02:00
dsv/dsv: change indentation to tab instead of 4 spaces; fix typo
This commit is contained in:
parent
7067c00a90
commit
8c5d7d7bcd
23
dsv/dsv
23
dsv/dsv
@ -109,8 +109,7 @@ set_value()
|
||||
A:|a:) alias="$alias \"$value\"";;
|
||||
D:|d:) url=$value;;
|
||||
Z:|z:) zip=$value;;
|
||||
"")
|
||||
;; # first iteration
|
||||
"") ;; # first iteration
|
||||
*) echo "unrecognized tag \"$tag\"" 2>&1
|
||||
exit 1;;
|
||||
esac
|
||||
@ -139,8 +138,10 @@ setup()
|
||||
cat -E "$n" | sed 's/[^$]$/&\n/;s/$$//' | {
|
||||
while read line; do
|
||||
[ "$line" = "${line###}" ] || continue
|
||||
tmp=`echo "$line" | awk '/^[^\t ]/ { print $1 }'`
|
||||
tail=`echo "$line" | sed 's/^[^\t ]*[\t ]*//;s/[\t ]*$//'`
|
||||
tmp=`echo "$line" |
|
||||
awk '/^[^\t ]/ { print $1 }'`
|
||||
tail=`echo "$line" |
|
||||
sed 's/^[^\t ]*[\t ]*//;s/[\t ]*$//'`
|
||||
if [ -z "$tmp" ]; then
|
||||
[ -z "$tail" ] || value="$value $tail"
|
||||
else
|
||||
@ -160,13 +161,20 @@ list()
|
||||
{
|
||||
while true; do
|
||||
if [ -d $DSV_DIR ]; then
|
||||
ls -b -1 $DSV_DIR | sed 's/^dsv-//p;d' | sed 's|%2F|/|g;s/%25/%/g'
|
||||
ls -b -1 $DSV_DIR | sed 's/^dsv-//p;d' |
|
||||
sed 's|%2F|/|g;s/%25/%/g'
|
||||
fi
|
||||
up || break
|
||||
done | sort | uniq | column
|
||||
}
|
||||
|
||||
|
||||
view()
|
||||
{
|
||||
${DSV_VIEWER:-${DSV_PDFVIEWER:-xdg-open}} "$@"
|
||||
}
|
||||
|
||||
|
||||
search()
|
||||
{
|
||||
while true; do
|
||||
@ -181,7 +189,7 @@ search()
|
||||
if $path; then
|
||||
echo "`pwd`/$DSV_DIR/$file"
|
||||
elif ! $show_url; then
|
||||
${DSV_VIEWER:-${DSV_PDFVIEWER:-xdg-open}} "$DSV_DIR/$file"
|
||||
view "$DSV_DIR/$file"
|
||||
fi
|
||||
if $show_url; then
|
||||
url=`sed 1d "$DSV_DIR/dsv-$name"`
|
||||
@ -189,7 +197,8 @@ search()
|
||||
echo "$url"
|
||||
else
|
||||
echo "$DSV_DIR/dsv-$name" \
|
||||
"does not contain an URL - please regenerate" 1>&2
|
||||
"does not contain a URL" \
|
||||
"- please regenerate" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user