Skip to content

Instantly share code, notes, and snippets.

@monnoval
Last active August 29, 2015 14:13
Show Gist options
  • Save monnoval/1242cdab0d09c7cf60ec to your computer and use it in GitHub Desktop.
Save monnoval/1242cdab0d09c7cf60ec to your computer and use it in GitHub Desktop.
Bash script to install Bare Theme
#! /bin/bash
echo -n "Name of your theme: "
read -e THEME
git clone --depth=1 [email protected]:msnoval/bare.git $THEME
cd ${THEME}
rm -rf .git
ack-grep -l --print0 "'bare'" | xargs -0 -n 1 sed -i -e 's/'\''bare'\''/'\'''$THEME''\''/g'
ack-grep -l --print0 'bare_' | xargs -0 -n 1 sed -i -e 's/bare_/'${THEME//-/_}'_/g'
ack-grep -l --print0 'Text Domain: bare' ./ | xargs -0 -n 1 sed -i -e 's/Text Domain: bare/Text Domain: '$THEME'/g'
ack-grep -l --print0 ' bare' | xargs -0 -n 1 sed -i -e 's/ bare/ '$THEME'/g'
ack-grep -l --print0 'bare-' | xargs -0 -n 1 sed -i -e 's/bare-/'$THEME'-/g'
mv src/languages/bare.pot src/languages/${THEME}.pot
mv src/inc/bare-tgm.php src/inc/${THEME}-tgm.php
mkdir build
#npm install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment