pcrone peut utiliser un répertoire existant
This commit is contained in:
parent
e4b77298bc
commit
470d7cfe41
15
uproject
15
uproject
|
@ -293,7 +293,11 @@ elif [ "$CMD" == crone ]; then
|
|||
setx destdir=basename -- "$path"
|
||||
destdir="${destdir%.git}"
|
||||
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
|
||||
[ -n "$user" ] || user=git
|
||||
|
@ -303,7 +307,14 @@ elif [ "$CMD" == crone ]; then
|
|||
|
||||
use_ssh_wrapper
|
||||
ssh "$userhost" create "$path" || die
|
||||
git clone "$userhost:$path" "$destdir" || 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
|
||||
fi
|
||||
git_annex_initial "$destdir" || die
|
||||
|
||||
elif [ "$CMD" == xconfig-export ]; then
|
||||
|
|
Loading…
Reference in New Issue