Change Details
dsv/dsv |
2 | 2 | # |
3 | 3 | # dsv - Improved data sheet viewer |
4 | 4 | # |
5 | | # Written 2010 by Werner Almesberger |
6 | | # Copyright 2010 Werner Almesberger |
| 5 | # Written 2010, 2011 by Werner Almesberger |
| 6 | # Copyright 2010, 2011 Werner Almesberger |
7 | 7 | # |
8 | 8 | # This program is free software; you can redistribute it and/or modify |
9 | 9 | # it under the terms of the GNU General Public License as published by |
... | ... | |
30 | 30 | |
31 | 31 | usage() |
32 | 32 | { |
33 | | echo "usage: $0 <component>" 2>&1 |
| 33 | echo "usage: $0 [-p] <component>" 2>&1 |
34 | 34 | echo " $0 help" 2>&1 |
35 | 35 | echo " $0 [ls]" 2>&1 |
36 | 36 | echo " $0 setup <info-file> ..." 2>&1 |
| 37 | echo 2>&1 |
| 38 | echo " -p show the path instead of displaying the file " 2>&1 |
37 | 39 | exit 1 |
38 | 40 | } |
39 | 41 | |
... | ... | |
148 | 150 | echo "$1 -> $file: does not exist" 2>&1 |
149 | 151 | exit 1 |
150 | 152 | fi |
151 | | ${DSV_PDFVIEWER:-xpdf} "$DSV_DIR/$file" |
| 153 | if $path; then |
| 154 | echo "`pwd`/$DSV_DIR/$file" |
| 155 | else |
| 156 | ${DSV_PDFVIEWER:-xpdf} "$DSV_DIR/$file" |
| 157 | fi |
152 | 158 | exit |
153 | 159 | fi |
154 | 160 | fi |
... | ... | |
160 | 166 | } |
161 | 167 | |
162 | 168 | |
| 169 | path=false |
| 170 | if [ "$1" = -p ]; then |
| 171 | path=true |
| 172 | shift |
| 173 | fi |
| 174 | |
163 | 175 | case "$1" in |
164 | 176 | help|-*) usage;; |
165 | 177 | ""|ls) list;; |
Download the corresponding diff file