ossp-pkg/shtool/sh.mkln 1.15 -> 1.16
--- sh.mkln 2003/05/09 09:50:13 1.15
+++ sh.mkln 2003/08/13 14:20:34 1.16
@@ -109,12 +109,12 @@
# split away a common prefix
prefix=""
- if [ ".$srcdir" = ".$dstdir" -a ".$srcdir" != . ]; then
+ if [ ".$srcdir" = ".$dstdir" ] && [ ".$srcdir" != . ]; then
prefix="$srcdir/"
srcdir=""
dstdir=""
else
- while [ ".$srcdir" != . -a ".$dstdir" != . ]; do
+ while [ ".$srcdir" != . ] && [ ".$dstdir" != . ]; do
presrc=`echo $srcdir | sed -e 's;^\([^/]*\)/.*;\1;'`
predst=`echo $dstdir | sed -e 's;^\([^/]*\)/.*;\1;'`
if [ ".$presrc" != ".$predst" ]; then
@@ -132,7 +132,12 @@
# determine source prefix which is the reverse directory
# step-up corresponding to the destination directory
srcpre=""
- if [ $oneisabs = 0 ] || [ ".$prefix" != . -a ".$prefix" != ./ ]; then
+
+ isroot=0
+ if [ ".$prefix" = . ] || [ ".$prefix" = ./ ]; then
+ isroot=1
+ fi
+ if [ $oneisabs = 0 ] || [ $isroot = 0 ]; then
pl="$dstdir/"
OIFS="$IFS"; IFS='/'
for pe in $pl; do
|
|