Date:2011-08-16 18:55:19 (12 years 7 months ago)
Author:Werner Almesberger
Commit:45031eb585f3134ac9e1996d8f614a0b2c2bb4e7
Message:dsv/dsv: added option -p to show the path to the file

Files: dsv/dsv (4 diffs)

Change Details

dsv/dsv
22#
33# dsv - Improved data sheet viewer
44#
5# Written 2010 by Werner Almesberger
6# Copyright 2010 Werner Almesberger
5# Written 2010, 2011 by Werner Almesberger
6# Copyright 2010, 2011 Werner Almesberger
77#
88# This program is free software; you can redistribute it and/or modify
99# it under the terms of the GNU General Public License as published by
...... 
3030
3131usage()
3232{
33    echo "usage: $0 <component>" 2>&1
33    echo "usage: $0 [-p] <component>" 2>&1
3434    echo " $0 help" 2>&1
3535    echo " $0 [ls]" 2>&1
3636    echo " $0 setup <info-file> ..." 2>&1
37    echo 2>&1
38    echo " -p show the path instead of displaying the file " 2>&1
3739    exit 1
3840}
3941
...... 
148150            echo "$1 -> $file: does not exist" 2>&1
149151            exit 1
150152        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
152158        exit
153159        fi
154160    fi
...... 
160166}
161167
162168
169path=false
170if [ "$1" = -p ]; then
171    path=true
172    shift
173fi
174
163175case "$1" in
164176    help|-*) usage;;
165177    ""|ls) list;;

Archive Download the corresponding diff file

Branches:
master



interactive