@adamshostack I'm confused. That looks like a find command except it starts with rm -rf. Probably either an arcane trick or a joke I'm missing here.
@adamshostack I am often dismayed by the amount of stuff that gets run as root for software installs and updates (often because everything under /usr is owned by root). For that matter, I'm frustrated by the amount of open-source software whose documentation says "just go to the terminal and run 'sudo <arcane series of commands>'". That's a really bad habit for users to be in, and for my part I'm certain that a sufficiently clever person could slip something malicious past me if they wanted to.
Fuller context:
studio_path="$DSTROOT/Applications/Studio 2.0"
home=$HOME
echo "applications path="$studio_path
echo "home path="$home
if [ -d "$studio_path" ]
then
# delete all from studio path except "ldraw"
sudo rm -rf "${studio_path}/" -mindepth 1 -maxdepth 1 ! -name "ldraw" -exec rm -rf {} +
# delete all from studio/ldraw path except "Custom Parts"
sudo find "${studio_path}/ldraw" -mindepth 1 -maxdepth 1 ! -name "Custom Parts" -exec rm -rf {} +
fi
@internic It does, doesn't it? Also, why the heck does it need to be root?