Use install(1) where possible
This eliminated a number of sudo calls by doing the copy/chown/chmod in
a single step and sets a common pattern.
Change-Id: I9c8f48854d5bc443cc187df0948c28b82c4d2838
diff --git a/lib/trove b/lib/trove
index d777983..dab6dce 100644
--- a/lib/trove
+++ b/lib/trove
@@ -121,10 +121,7 @@
setup_develop $TROVE_DIR
# Create the trove conf dir and cache dirs if they don't exist
- sudo mkdir -p ${TROVE_CONF_DIR}
- sudo mkdir -p ${TROVE_AUTH_CACHE_DIR}
- sudo chown -R $STACK_USER: ${TROVE_CONF_DIR}
- sudo chown -R $STACK_USER: ${TROVE_AUTH_CACHE_DIR}
+ sudo install -d -o $STACK_USER ${TROVE_CONF_DIR} ${TROVE_AUTH_CACHE_DIR}
# Copy api-paste file over to the trove conf dir
cp $TROVE_LOCAL_API_PASTE_INI $TROVE_API_PASTE_INI