Commit c9157cc1 authored by topjohnwu's avatar topjohnwu

Fix bug in clone dummy

parent 2b127038
...@@ -119,7 +119,11 @@ travel() { ...@@ -119,7 +119,11 @@ travel() {
clone_dummy() { clone_dummy() {
for ITEM in $MIRRDIR$1/* ; do for ITEM in $MIRRDIR$1/* ; do
REAL=${ITEM#$MIRRDIR} REAL=${ITEM#$MIRRDIR}
if [ ! -e $MOUNTINFO$REAL ]; then if [ -d $MOUNTINFO$REAL ]; then
# Need to clone deeper
mkdir -p $DUMMDIR$REAL
(clone_dummy $REAL)
else
if [ -L $ITEM ]; then if [ -L $ITEM ]; then
# Copy original symlink # Copy original symlink
cp -afc $ITEM $DUMMDIR$REAL cp -afc $ITEM $DUMMDIR$REAL
...@@ -129,13 +133,9 @@ clone_dummy() { ...@@ -129,13 +133,9 @@ clone_dummy() {
else else
mktouch $DUMMDIR$REAL mktouch $DUMMDIR$REAL
fi fi
# Mount the mirror # Mount the mirror if not module item
mktouch $MOUNTINFO/mirror$REAL [ ! -e $MOUNTINFO$REAL ] && mktouch $MOUNTINFO/mirror$REAL
fi fi
elif [ -d $MOUNTINFO$REAL ]; then
# Need to clone deeper
mkdir -p $DUMMDIR$REAL
(clone_dummy $REAL)
fi fi
done done
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment