2005-01-07 19:10:22 +00:00
|
|
|
#!/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"" ]
|
2005-07-22 18:45:52 +00:00
|
|
|
then
|
|
|
|
echo cleanname failed 1>&2
|
2005-09-13 00:22:50 +00:00
|
|
|
exit 2
|
2005-07-22 18:45:52 +00:00
|
|
|
fi
|
|
|
|
|
2005-01-07 19:10:22 +00:00
|
|
|
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
|
2005-01-07 19:10:22 +00:00
|
|
|
X/'/w
|
|
|
|
q
|
2005-01-19 00:38:07 +00:00
|
|
|
" | sam -d `cat lib/moveplan9.files` >/dev/null 2>&1
|
2005-01-07 19:10:22 +00:00
|
|
|
|