URI: 
       tmoveplan9.sh - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       tmoveplan9.sh (465B)
       ---
            1 #!/bin/sh
            2 
            3 case $# in
            4 0)
            5         old=/usr/local/plan9
            6         ;;
            7 1)
            8         old=`cleanname $1`
            9         ;;
           10 *)
           11         echo 'usage: moveplan9.sh [oldpath]' 1>&2
           12         exit 1
           13 esac
           14 
           15 [ -z "$PLAN9_TARGET" ] && PLAN9_TARGET="$PLAN9"
           16 new=`cleanname $PLAN9_TARGET`
           17 
           18 if [ X"$new" = X"" ]
           19 then
           20         echo cleanname failed 1>&2
           21         exit 2
           22 fi
           23 
           24 cd $PLAN9
           25 # Avoid broken builtin echo in dash that turns \1 into ^A
           26 `which echo` '
           27         X ,s;'$old'($|/|});'$new'\1;g
           28         X/'"'"'/w
           29         q
           30 ' | sam -d `cat lib/moveplan9.files` >/dev/null 2>&1
           31