File: cd-tkdesk

package info (click to toggle)
tkdesk 2.0-12
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,596 kB
  • sloc: tcl: 20,764; ansic: 16,262; sh: 359; makefile: 233
file content (20 lines) | stat: -rwxr-xr-x 490 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
#
# Usage: cd-tkdesk [directory]
# Changes path of currently active browser to directory, or prints out
# its current path if no arg is given.

if [ $# -gt 0 ]; then
  DIR=$1
  if [ "$DIR" = "." ]; then
    DIR=`pwd`
  elif [ "$DIR" = ".." ]; then
    DIR=`dirname $(pwd)`
  elif [ "x`echo $DIR | grep '^[/~]'`" = "x" ]; then
    DIR=`pwd`/$DIR
  fi
  tkdeskclient "dsk_active dir $DIR" >/dev/null
else
  # read TkDesk's current dir from socket
  tkdeskclient "dsk_active dir"
fi