#!/usr/bin/env bash DRUPAL_DIR=drupal-8.2.x-2333243 # Download drupal and cd into the directory drush dl drupal-8.2.x --drupal-project-rename="$DRUPAL_DIR"> /dev/null 2>&1 # Change into the Drupal directory. cd "$DRUPAL_DIR" # Download the Roboto.woff2 font file and place in themes/junk/fonts. curl https://fonts.gstatic.com/s/roboto/v15/CWB0XYA8bzo0kSThX0UTuA.woff2 --create-dirs -o themes/junk/fonts/Roboto.woff2 > /dev/null 2>&1 # Create repo and perform initial commit. git init -q && git add -A && git commit -q -m "Initial commit." # Append 10 null btyes to Roboto.woff2. truncate -s +10 themes/junk/fonts/Roboto.woff2 # Commit the change. git add -A && git commit -q -m "Added 10 bytes to the end of Roboto.woff2" # Create the diff. clear echo -e "\n------------------------------------------------------------" git diff HEAD^ HEAD echo -e "------------------------------------------------------------\n" echo -e "This diff is incorrect. Roboto.woff2 is a binary file.\n" # Update the .gitattributes file to categorize additional font files. echo -e "Now modifying .gitattributes to categorize *.woff2 as binary..." echo "*.woff2 -text diff" >> .gitattributes # Create the diff. echo -e "\n------------------------------------------------------------" git diff HEAD^ HEAD echo -e "------------------------------------------------------------\n" echo -e "This diff is correct.\n"