pcrone peut utiliser un répertoire existant
This commit is contained in:
parent
e4b77298bc
commit
470d7cfe41
13
uproject
13
uproject
|
@ -293,7 +293,11 @@ elif [ "$CMD" == crone ]; then
|
||||||
setx destdir=basename -- "$path"
|
setx destdir=basename -- "$path"
|
||||||
destdir="${destdir%.git}"
|
destdir="${destdir%.git}"
|
||||||
fi
|
fi
|
||||||
[ -d "$destdir" ] && die "$(ppath "$destdir"): répertoire existant"
|
tmpdestdir=
|
||||||
|
if [ -d "$destdir" ]; then
|
||||||
|
[ -d "$destdir/.git" ] && die "$(ppath "$destdir"): répertoire existant"
|
||||||
|
ac_set_tmpdir tmpdestdir
|
||||||
|
fi
|
||||||
|
|
||||||
splituserhost "$userhost" user host
|
splituserhost "$userhost" user host
|
||||||
[ -n "$user" ] || user=git
|
[ -n "$user" ] || user=git
|
||||||
|
@ -303,7 +307,14 @@ elif [ "$CMD" == crone ]; then
|
||||||
|
|
||||||
use_ssh_wrapper
|
use_ssh_wrapper
|
||||||
ssh "$userhost" create "$path" || die
|
ssh "$userhost" create "$path" || die
|
||||||
|
if [ -n "$tmpdestdir" ]; then
|
||||||
|
setxx destname=abspath "$destdir" // basename
|
||||||
|
git clone "$userhost:$path" "$tmpdestdir/$destname" || die
|
||||||
|
mv "$tmpdestdir/$destname/.git" "$destdir" || die
|
||||||
|
ac_clean "$tmpdestdir"
|
||||||
|
else
|
||||||
git clone "$userhost:$path" "$destdir" || die
|
git clone "$userhost:$path" "$destdir" || die
|
||||||
|
fi
|
||||||
git_annex_initial "$destdir" || die
|
git_annex_initial "$destdir" || die
|
||||||
|
|
||||||
elif [ "$CMD" == xconfig-export ]; then
|
elif [ "$CMD" == xconfig-export ]; then
|
||||||
|
|
Loading…
Reference in New Issue