Skip to content

Commit

Permalink
Fix find arguments to avoid deleting the searched dir
Browse files Browse the repository at this point in the history
  • Loading branch information
nothingface0 committed Jun 20, 2024
1 parent d2494ea commit 6fbb3bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deploy_dqmgui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ preliminary_checks() {
# Delete installation (config & sw, does not delete state)
if [ -d "${INSTALLATION_DIR:?}/${DMWM_GIT_TAG:?}" ]; then
echo "WARNING: $INSTALLATION_DIR/$DMWM_GIT_TAG exists, deleting contents (except auth)"
find "${INSTALLATION_DIR:?}/${DMWM_GIT_TAG:?}/" -maxdepth 1 -type d ! -name auth -exec rm -rf {} \;
find "${INSTALLATION_DIR:?}/${DMWM_GIT_TAG:?}/" -maxdepth 1 -mindepth 1 -type d ! -path . ! -name auth -exec rm -rf {} \;
fi

if [ -n "$DMWM_PRS" ]; then
Expand Down

0 comments on commit 6fbb3bd

Please sign in to comment.