Commit 8b9e3e79 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-3380: removing rebuilding pattern lab script

parent 84000ac0
drupal_core_path=${1:-/var/www/drupal8}
pattern_lab_root_path=${2:-/var/www/html}
drupal_directory=${3:-drupal8}
echo "Rebuilding Pattern Lab..."
if [ -d "$pattern_lab_root_path/uw_wcms_pattern_lab" ]; then
echo "Removing old Pattern Lab ..."
rm -rf "$pattern_lab_root_path/uw_wcms_pattern_lab"
echo "Done removing old Pattern Lab."
fi
echo "Starting new Pattern Lab ..."
git clone "https://git.uwaterloo.ca/wcms/uw_wcms_pattern_lab.git" $pattern_lab_root_path/uw_wcms_pattern_lab
cd "$pattern_lab_root_path/uw_wcms_pattern_lab"
echo "Starting twig functions fix ..."
if [ -e "$pattern_lab_root_path/uw_wcms_pattern_lab/uw_wcms_pl_variables.sh" ]
then
rm "$pattern_lab_root_path/uw_wcms_pattern_lab/uw_wcms_pl_variables.sh"
fi
echo "$drupal_directory" >> "$pattern_lab_root_path/uw_wcms_pattern_lab/uw_wcms_pl_variables.sh"
chmod 775 "$pattern_lab_root_path/uw_wcms_pattern_lab/uw_wcms_pl_variables.sh"
echo "Done twig functions fix."
yarn install
echo "Done yarn install."
cd components/js
if [ -f "ready.min.js" ]; then
rm ready.min.js
fi
if [ -f "drupal.js" ]; then
rm drupal.js
fi
if [ -f "drupal.js" ]; then
rm jquery.min.js
fi
ln -s "$drupal_core_path/core/assets/vendor/domready/ready.min.js"
ln -s "$drupal_core_path/core/misc/drupal.js"
ln -s "$drupal_core_path/core/assets/vendor/jquery/jquery.min.js"
echo "Done theme install."
echo "Starting watch so distr directory gets created"
cd "$pattern_lab_root_path/uw_wcms_pattern_lab"
gulp compile
gulp build
echo "Done rebuilding Pattern Lab."
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment