plumber

Plumber – a modern approach to plumbing
git clone git://r-36.net/plumber
Log | Files | Refs | LICENSE

scmopener (321B)


      1 #!/bin/sh
      2 
      3 if [ $# -lt 1 ];
      4 then
      5 	printf "usage: %s scm:path\n" "$(basename "$0")" >&2
      6 	exit 1
      7 fi
      8 
      9 [ -z "$SCM" ] && exit 1
     10 
     11 path="$SCM/$(printf "%s\n" "$1" | cut -d':' -f 2-)"
     12 if [ -d "$path" ];
     13 then
     14 	[ -z "$SHELL" ] && SHELL="/bin/sh"
     15 	st -e /bin/sh -c "cd \"${path}\"; $SHELL" >&2 >/dev/null &
     16 	exit 0
     17 fi
     18 
     19 see "$path"
     20