Skip to content

Commit

Permalink
Simplify downloading latest drupal 7 using drush
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-a-s committed Jan 5, 2024
1 parent 5f118d7 commit 398449f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions scripts/install-drupal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,11 @@ if command -v apt-get > /dev/null; then # Install other dependencies for debian-
sudo apt-get install -y curl tar wget
fi

# Store latest drupal seven version to a variable
latest_drupal_seven_version=$(curl https://www.drupal.org/project/drupal/releases -s | grep '7\.[0-9][0-9]' | awk -F 'releases/' 'NR==1{print $2}' | awk -F '"' '{print $1}')

# Install Drupal
sudo chown -R "$USER" "$DRUPAL_HOME"
cd "$DRUPAL_HOME" || exit
mv index.html index.html.orig
wget http://ftp.drupal.org/files/projects/drupal-"$latest_drupal_seven_version".tar.gz
tar -zxf drupal-"$latest_drupal_seven_version".tar.gz
rm drupal-"$latest_drupal_seven_version".tar.gz
mv drupal-"$latest_drupal_seven_version"/ "$drupalsitedir"/
drush dl drupal --drupal-project-rename="$drupalsitedir"

# Setup Drupal
cd "$drupalsitedir" || exit
Expand Down

0 comments on commit 398449f

Please sign in to comment.