sh
We ran into a problem with the maillog table in my sql-dump - so we just excluded it from the dump
skip-tables.sh
drush sql-dump --skip-tables-list=maillog
25.08.2023 | Dominik Wille
Skip tables in drush sql-dump
calc-release.sh
#!/bin/bash
latest=$(git tag -l | sort -V | tail -n1)
semver_parts=(${latest//./ })
major=${semver_parts[0]}
minor=${semver_parts[1]}
patch=${semver_parts[2]}
patch_version=${major}.${minor}.$((patch+1))
minor_version=${major}.$((minor+1)).0
major_version=$((major+1)).0.0
echo "latest: $latest"
echo "patch release: $patch_version"
echo "minor release: $minor_version"
echo "major release: $major_version"
13.11.2025 | Marc Hitscherich
Calculate next suitable version tag from git
mysql8 to mariadb.sh
cat olddump.sql | sed -e s/uca1400_as_ci/utf8mb4_general_ci/ | gzip > newdump.sql.gz
12.03.2026 | Pascal Crott, Michael Böker
Convert MySQL 8 Database Dump to MariaDB
./compat.sh gpd setup ./compat.sh gpd run
A small shell-script to check Drupal 7 projects for PHP version compatibility which outputs to csv.
Usage: ./compat.sh projectname (setup|run)
Change Version (in this example: 7.4) when needed.
compat.sh
#!/bin/sh
PROJ=$1
# Setup project dependencies.
if [ "$2" = "setup" ]; then
composer require squizlabs/php_codesniffer
composer require phpcompatibility/php-compatibility
fi
# Run checks.
if [ "$2" = "run" ]; then
phpcs --standard=PHPCompatibility --runtime-set testVersion 7.3 web/sites/all/modules/ --report-csv="$PROJ"_php73_modules.csv --extensions=php,inc,module -d memory_limit=512M
phpcs --standard=PHPCompatibility --runtime-set testVersion 7.3 web/sites/all/libraries/ --report-csv="$PROJ"_php73_lib.csv --extensions=php,inc,module -d memory_limit=512M
phpcs --standard=PHPCompatibility --runtime-set testVersion 7.3 web/sites/all/themes/ --report-csv="$PROJ"_php73_themes.csv --extensions=php,inc,module,theme -d memory_limit=512M
fi
27.04.2022 | Nikolas Kopp