plan9port/lib/moveplan9.sh

29 lines
335 B
Bash
Raw Normal View History

#!/bin/sh
2005-09-13 00:22:50 +00:00
case $# in
0)
old=/usr/local/plan9
;;
1)
old=`cleanname $1`
;;
*)
echo 'usage: moveplan9.sh [oldpath]' 1>&2
exit 1
fi
new=`cleanname $PLAN9`
if [ X"$new" = X"" ]
then
echo cleanname failed 1>&2
2005-09-13 00:22:50 +00:00
exit 2
fi
cd $PLAN9
2005-01-07 23:11:02 +00:00
echo "
2005-09-13 00:22:50 +00:00
X ,s;$old(\$|/|});$new\\1;g
X/'/w
q
2005-01-19 00:38:07 +00:00
" | sam -d `cat lib/moveplan9.files` >/dev/null 2>&1