On 03/19/2016 02:40 AM, Andy Chu wrote: > This fixes a failing test case in mv.test.
There are actually three modes: -n will leave the existing file. -f will delete the existing file only if it can't write to it. --remove-destination will delete the existing file before trying to write to it. Alas, for installing, you want --remove-destination. Which is so very non-posix it doesn't even have a short option. cp -f will stomp a toybox or busybox binary so everything is bunzip2, and -n will leave the existing file (not install the new one). That's why this is still on my todo list, I wanted to have scripts/install.sh --force do --remove-destination, but can't assume the host's cp has it. I should just make it rm -f then cp -n in two commands... Rob _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
