Skip to content

Instantly share code, notes, and snippets.

@whikloj
Last active January 23, 2018 18:42
Show Gist options
  • Save whikloj/5ddd3ff65dc6cebfd92ea4e2fdb9e2da to your computer and use it in GitHub Desktop.
Save whikloj/5ddd3ff65dc6cebfd92ea4e2fdb9e2da to your computer and use it in GitHub Desktop.
Issue-736 inside VM fix
#!/bin/bash
# This version displays a warning to the screen about having the password on the command line.
# This can be disregarded or use the other script with mysql_config_editor
MYSQL_USER="drupal8"
MYSQL_PASS="islandora"
MYSQL_DB="drupal8"
DRUPAL_ROOT="/var/www/html/drupal"
cd $DRUPAL_ROOT/web
$DRUPAL_ROOT/vendor/bin/drupal module:uninstall islandora_image islandora_collection
$DRUPAL_ROOT/vendor/bin/drupal config:delete active field.field.media.tn.field_height
$DRUPAL_ROOT/vendor/bin/drupal config:delete active field.field.media.tn.field_width
$DRUPAL_ROOT/vendor/bin/drupal config:delete active field.field.media.tn.field_mimetype
$DRUPAL_ROOT/vendor/bin/drupal config:delete active field.field.media.tn.field_image
$DRUPAL_ROOT/vendor/bin/drupal module:uninstall islandora
TABLES=$(mysql --database=$MYSQL_DB --user=$MYSQL_USER --password=$MYSQL_PASS --batch -e 'show tables;' | grep -e '^field_deleted_*')
if [ ! -z "${TABLES}" ]; then
for item in $TABLES; do
echo "DROP TABLE $item"
`mysql --database=$MYSQL_DB --user=$MYSQL_USER --password=$MYSQL_PASS --batch -e "drop table ${item};"`
done
else
echo "NO field_deleted_* TABLES FOUND."
fi
cd $DRUPAL_ROOT/web/modules/contrib/islandora
git remote add whikloj https://github.com/whikloj/islandora-1.git
git fetch whikloj
git checkout whikloj/issue-736
cd $DRUPAL_ROOT/web
$DRUPAL_ROOT/vendor/bin/drupal router:rebuild
$DRUPAL_ROOT/vendor/bin/drupal cache:rebuild all
$DRUPAL_ROOT/vendor/bin/drupal module:install islandora islandora_collection islandora_image
MODULES="Gemini Milliner"
for i in $MODULES; do
cd /var/www/html/Crayfish/$i/vendor/islandora/
sudo rm -rf crayfish-commons
sudo git clone https://github.com/whikloj/Crayfish-commons.git --branch issue-736 crayfish-commons
cd crayfish-commons
sudo composer install
done
echo "Ready for testing"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment