[file_utils] mvparent: don't overwrite files
Use mv's -n option to avoid overwriting files.
This commit is contained in:
parent
519303988c
commit
336f9160f7
|
@ -37,11 +37,11 @@ while [ "$1" != "" ] ; do
|
||||||
cd "$REP"
|
cd "$REP"
|
||||||
|
|
||||||
if [ "$(echo "$TARGET"/*)" != "$TARGET/*" ] ; then
|
if [ "$(echo "$TARGET"/*)" != "$TARGET/*" ] ; then
|
||||||
mv "$TARGET"/* .
|
mv -n "$TARGET"/* .
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(echo "$TARGET"/.[!.]*)" != "$TARGET/.[!.]*" ] ; then
|
if [ "$(echo "$TARGET"/.[!.]*)" != "$TARGET/.[!.]*" ] ; then
|
||||||
mv "$TARGET"/.[!.]* .
|
mv -n "$TARGET"/.[!.]* .
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rmdir "$TARGET"
|
rmdir "$TARGET"
|
||||||
|
|
Loading…
Reference in New Issue