mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Keep extras on upgrade in macos
This commit is contained in:
parent
678831fa65
commit
fb0e7a9d42
1 changed files with 13 additions and 5 deletions
|
@ -96,12 +96,20 @@ if [ -L "$SBIN_DIR/salt-config" ]; then
|
|||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Remove the $INSTALL_DIR directory
|
||||
# Remove folders and files from the INSTALL_DIR
|
||||
# Don't remove extras-3.10
|
||||
#-------------------------------------------------------------------------------
|
||||
if [ -d "$INSTALL_DIR" ]; then
|
||||
log "Cleanup: Removing $INSTALL_DIR"
|
||||
rm -rf "$INSTALL_DIR"
|
||||
log "Cleanup: Removed Successfully"
|
||||
for dir in "$INSTALL_DIR"/*/; do
|
||||
if [[ "$dir" != *"extras-3."* ]]; then
|
||||
log "Cleanup: Removing $dir"
|
||||
rm -rf "$dir"
|
||||
fi
|
||||
done
|
||||
log "Cleanup: Removed Directories Successfully"
|
||||
|
||||
if [ -f "$INSTALL_DIR/salt-minion" ]; then
|
||||
find $INSTALL_DIR -maxdepth 1 -type f -delete
|
||||
log "Cleanup: Removed Files Successfully"
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Reference in a new issue