Skip to content

Instantly share code, notes, and snippets.

@NorthDecoder
Last active April 18, 2018 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NorthDecoder/29c3b6ebbd610f971ad2 to your computer and use it in GitHub Desktop.
Save NorthDecoder/29c3b6ebbd610f971ad2 to your computer and use it in GitHub Desktop.
Drupal 7.58 module and theme installation with drush commands
#!/bin/bash
# Installation of Drupal, modules and themes with drush commands
# from http://www.drushcommands.com/drush-7x/pm/pm-download
# Specific revisions of each module are installed. Research each
# module to confirm that you are installing the lastest revision.
# Instructions for installation
# SFTP this file into your installation directory
# For example; the directory '/home/myloginname/public_html' .
#
# From the command prompt:
# Make the script executable:
# $ chmod 755 install_drupal_modules.sh
# run this shellscript with stdout and sterr piped to a logfile:
# $ ./install_drupal_modules.sh 2>&1 | tee -a command.log
# Inspect the installation results by opening the command.log
# with an editor.
# ######################################
# Some example modules that you might like to have installed
# from https://www.drupal.org/project/myModuleNameHere
# Module Name why needed
# ----------------- -------------------
# admin menu nice drop down and flyout menus for the site admin
# module filter search the module names rather descriptions
# sweaver site design manage colors and styles
# jqueryupdate required by bootstrap theme and others
# ckeditor wysiwg editor for users
# imce folder and upload manager for users
# ctools helper module for other modules
# views requires ctools
# libraries external libraries not part of core or modules
# radix_layouts for panopoly theme
# backup_migrate backup/restore Drupal MySQL database, code, files
# auth0 SSO for Enterprises + Social Login + User/Passwords
# organic_groups users create & manage own groups
# google_analytics web statistics tracking system
# composer_manager manages contributed php modules
# markdown a markown reader
# bootstrap theme
# kalatheme theme
# panopoly theme
# skeleton theme, responsive
# professional theme, responsive
# adaptive theme, responsive
# corolla theme # must have adaptivetheme installed first
# zurb_foundation theme, responsive
# zeropoint theme, responsive
# ######################################
# Edit this to the specific drupal version
cmsVersion="7.58"
# No need to edit below here
# # # # # # # # # # # # # # # # # # #
cmsName="drupal"
cmsShortVersion=$(printf "$cmsVersion" | tr -d ".")
cmsFullName=$cmsName"-"$cmsVersion
drupalDirectory=d"$cmsShortVersion"
echo "Preparing to install "$cmsFullName" in directory "$drupalDirectory
# exit on error
set -e
# In the public_html directory, install a new Drupal.
# This will probably overwrite an existing Drupal of
# same revision!
drush dl $cmsFullName
# rename the directory to 'dnnn'
# where nnn is the shortened version number without dot
mv -v $cmsFullName $drupalDirectory
#work from here
BASE_DIRECTORY=$(pwd)
# pick the correct directory for modules
cd $BASE_DIRECTORY/$drupalDirectory/sites/all/modules
# download the modules
# As the modules revisions change you will need
# to update these names case by case by checking
# the project page of each module.
echo "\n"
echo "Installing modules\n"
echo "====================\n"
drush dl admin_menu-7.x-3.0-rc5
drush dl module_filter-7.x-2.1
drush dl ctools-7.x-1.14
drush dl sweaver-7.x-1.3
drush dl jquery_update-7.x-3.0-alpha5
drush dl ckeditor-7.x-1.18
drush dl imce-7.x-1.11
drush dl views-7.x-3.18
drush dl libraries-7.x-2.3
drush dl advanced_help-7.x-1.3
drush dl panels-7.x-3.9
drush dl radix_layouts-7.x-3.4
drush dl filedepot-7.x-1.3
drush dl backup_migrate-7.x-3.5
drush dl auth0-7.x-2.x-dev
drush dl og-7.x-2.9
drush dl google_analytics-7.x-2.4
drush dl composer_manager-7.x-1.8
drush dl markdown-7.x-1.5
drush dl content_access-7.x-1.2-beta2
drush dl entity-7.x-1.9
drush dl entityreference-7.x-1.5
# download the themes
echo -e "\n"
echo "Installing themes"
echo -e "====================\n"
# ###########################
# pick the correct directory for themes
cd $BASE_DIRECTORY/$drupalDirectory/sites/all/themes
# Install themes
# Starters
drush dl bootstrap-7.x-3.15
drush dl kalatheme-7.x-3.2
drush dl zen-7.x-6.4
drush dl radix-7.x-3.6
# Responsive
drush dl skeletontheme-7.x-1.4
drush dl professional_theme-7.x-2.05
drush dl adaptivetheme-7.x-3.4
drush dl corolla-7.x-3.1 # must havd adaptivetheme installed first
drush dl zurb_foundation-7.x-5.0-rc7
drush dl zeropoint-7.x-4.10
# panopoly is installed in the modules folder...
drush dl panopoly_theme-7.x-1.47
echo " "
echo -e "====================\n"
echo " "
echo "Now do manual setup of the database name in cPanel"
echo "with something like MySQL® Database Wizard."
echo " "
echo "Then do the initial installation of Drupal in the"
echo "web administration page at yoursite.com/"$drupalDirectory"/index.php"
echo " "
# That's all folks
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment