Skip to content

Commit

Permalink
Update patch_views.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
DonRichards authored Dec 4, 2024
1 parent 70d504d commit d3db27b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions scripts/patch_views.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ troubleshoot_drupal() {
echo "---------------------"

# Always process views, regardless of error message
# while IFS= read -r dis_view; do
# log "Processing view: $dis_view"
# drush views:disable "$dis_view" || log "Error disabling view: $dis_view"
# sleep 1
# drush views:enable "$dis_view" || log "Error enabling view: $dis_view"
# done < "$VIEWS_FILE"
while IFS= read -r dis_view; do
log "Processing view: $dis_view"
drush views:disable "$dis_view" || log "Error disabling view: $dis_view"
sleep 1
drush views:enable "$dis_view" || log "Error enabling view: $dis_view"
done < "$VIEWS_FILE"

# Ensure Devel module
DEVEL_INITIALLY_ENABLED=$(drush pm:list | grep devel | grep -F 'Devel (devel)' | grep -q "Enabled" && echo "Enabled" || echo "Disabled")
Expand All @@ -66,9 +66,9 @@ troubleshoot_drupal() {
drush pm:enable -y devel || log "Error: Devel module enabling failed"
fi

# Attempt to reinstall Islandora (with error suppression)
log "Attempting Islandora module uninstallation..."
drush devel:reinstall -y islandora || log "Islandora uninstall may have partial failure. This can be ignored."
# Attempt to reinstall Islandora (with error suppression). For new installs only.
# log "Attempting Islandora module uninstallation..."
# drush devel:reinstall -y islandora || log "Islandora uninstall may have partial failure. This can be ignored."

# Clear caches
log "Rebuilding caches..."
Expand Down Expand Up @@ -98,4 +98,4 @@ if [[ "$DEVEL_INITIALLY_ENABLED" == "Disabled" ]]; then
drush pm:uninstall -y devel
fi

echo "Check LOG at $LOG_FILE"
echo "Check LOG at $LOG_FILE"

0 comments on commit d3db27b

Please sign in to comment.