diff --git a/mvparent/mvparent.sh b/mvparent/mvparent.sh index 02d63ab..b3cda7b 100755 --- a/mvparent/mvparent.sh +++ b/mvparent/mvparent.sh @@ -26,5 +26,13 @@ fi echo "Move the contents of « $rep/$cible » into « $rep »…" >&2 cd "$rep" -mv "$cible"/* "$cible"/.[!.]* . + +if [ "$(echo "$cible"/*)" != "$cible/*" ] ; then + mv "$cible"/* . +fi + +if [ "$(echo "$cible"/.[!.]*)" != "$cible/.[!.]*" ] ; then + mv "$cible"/.[!.]* . +fi + rmdir "$cible"