diff options
Diffstat (limited to 'files')
-rwxr-xr-x | files/drupal | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/files/drupal b/files/drupal index e43fd49..bc4b12f 100755 --- a/files/drupal +++ b/files/drupal @@ -5,7 +5,8 @@ BASE=${BASE:="/var/www/data"} SITES=${SITES:="$BASE/drupal"} -SERIES="6 7 8" +SERIES="6 7 8 9" +LATEST_SERIES="9" # Ensure we have a proper path, useful when called through cron export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' @@ -152,7 +153,7 @@ function drupal_current { local series="$1" if [ -z "$series" ]; then - series="8" + series="$LATEST_SERIES" fi if [ -e "$BASE/drupal-${series}" ]; then @@ -169,7 +170,7 @@ function drupal_latest { local series="$1" if [ -z "$series" ]; then - series="8" + series="$LATEST_SERIES" fi latest="`wget -O- -q https://updates.drupal.org/release-history/drupal/${series}.x | grep -oPm1 "(?<=<download_link>)[^<]+" | grep -v -- '-dev' | grep -v -- '-alpha' | grep -v -- '-beta' | grep -v -- '-rc' | head -1`" @@ -188,7 +189,10 @@ function drupal_download { fi # Check for latest releases if no specific version was given - if [ "$new" == "8" ]; then + if [ "$new" == "9" ]; then + drupal_series="9" + new="`drupal_latest 9`" + elif [ "$new" == "8" ]; then drupal_series="8" new="`drupal_latest 8`" elif [ "$new" == "7" ]; then @@ -237,7 +241,11 @@ function drupal_upgrade { new="$2" # Fix versions if just a series is given - if [ "$old" == "8" ] && [ -z "$new" ]; then + if [ "$old" == "9" ] && [ -z "$new" ]; then + old="`drupal_current 9`" + new="`drupal_latest 9`" + drupal_series="9" + elif [ "$old" == "8" ] && [ -z "$new" ]; then old="`drupal_current 8`" new="`drupal_latest 8`" drupal_series="8" |