home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 February
/
PCWorld_2000-02_cd.bin
/
live
/
usr
/
X11R6
/
bin
/
pop-tkdesk
< prev
next >
Wrap
Text File
|
1998-10-10
|
631b
|
27 lines
#!/bin/sh
#
# Usage: pop-tkdesk file
# Opens the specified files by performing the default action of their
# associated TkDesk popup menu (this is the first menu item), or asks
# for a command to execute if no files are given.
if [ $# -gt 0 ]; then
if [ $# -gt 1 ]; then
echo "`basename $0`: can only display the popup for one file"
exit 1
fi
FILES=
for f in $@; do
if [ -z "`echo $f | grep '^[/~]'`" ]; then
FILES="`pwd`/$f $FILES"
else
FILES="$f $FILES"
fi
done
tkdeskclient "cd `pwd`; dsk_show_popup `echo $FILES`; cd" >/dev/null
else
echo "usage: pop-tkdesk file"
exit 2
fi