Skip to content

Instantly share code, notes, and snippets.

@grasmash
Created January 2, 2014 16:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grasmash/8221729 to your computer and use it in GitHub Desktop.
Save grasmash/8221729 to your computer and use it in GitHub Desktop.
Rebuilds installed DKAN distribution with fresh make files.
#!/bin/bash
GITURL="http://git.drupal.org/project/dkan.git"
BRANCH="7.x-1.x"
PREFIX="projects/dkan"
echo "Pulling in latest updates on branch $BRANCH from remote $GITURL."
# Change to git root directory.
cd "$(git rev-parse --show-toplevel)"
git subtree pull --squash --prefix=$PREFIX $GITURL $BRANCH
#!/bin/bash
# Pull down latest copy of DKAN.
./distro.pull.sh
GIT_ROOT=$(git rev-parse --show-toplevel)
cd $GIT_ROOT
echo "Removing docroot"
rm -rf docroot
echo "Building DKAN profile"
drush make -y scripts/build-dkan-profile.make docroot --no-gitinfofile
# Remove .gitignore files that are undesired.
rm docroot/profiles/dkan/.gitignore
rm docroot/profiles/dkan/libraries/Leaflet/.gitignore
echo "Symlinking sites directory to docroot/sites"
cd docroot
rm -rf sites
ln -s ../sites
echo "Symlinking .htaccess docroot/.htaccess"
rm .htaccess
ln -s ../.htaccess
echo "Symlinking robots.txt to docroot/robots.txt"
rm robots.txt
ln -s ../robots.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment