ev3dev / brickstrap

Tool for bootstrapping Debian and creating bootable image files for embedded systems
MIT License
35 stars 26 forks source link

delete command does not delete the <dest> directory #34

Closed dlech closed 8 years ago

dlech commented 8 years ago

Now that all of the generated files live under one directory, the delete command should rm -rf that directory.

dlech commented 8 years ago

If the -d option is not specified, the dest directory is $(pwd). In that case, rm -f * would make more sense. @cmacq2, what is the best way to tell if -d was specified or not?

cmacq2 commented 8 years ago

That's actually the wrong approach. What you should do is check whether $(pwd) is at or underneath $(br_dest_dir). Because if you delete the current working directory the shell can get cranky... (the user won't notice until subsequent commands mysteriously fail, say ls).

cmacq2 commented 8 years ago

Since PR #44 is now merged, this issue can probably be closed.