a65ef3200a
* Rename bb theme to make it not experimental * Include theme.json files in dot org packaging * Renamed all BCB Family Themes theme.json file * Add font size to site title block. Co-authored-by: Jeff Ong <jonger4@gmail.com>
17 lines
No EOL
710 B
Bash
Executable file
17 lines
No EOL
710 B
Bash
Executable file
#!/bin/zsh
|
|
if [[ "$1" != "" ]]; then
|
|
THEME="$1"
|
|
find $THEME/assets/sass/*.scss -type f -exec sed -i '' 's/-wpcom//g' {} \;
|
|
find $THEME/assets/sass/*.scss -type f -exec sed -i '' 's/, auto-loading-homepage//g' {} \;
|
|
find $THEME/assets/sass/*.scss -type f -exec sed -i '' 's/, jetpack-global-styles//g' {} \;
|
|
cd $THEME && npm run build;
|
|
mkdir $THEME;
|
|
rsync -avz --include='theme.json' --exclude $THEME --exclude-from '../dotorg-exclude.txt' ./ $THEME
|
|
find $THEME -type f -name '*.map' -delete # for some reason rsync won't exclude map files
|
|
rm -rf $THEME/$THEME
|
|
zip -r -X $THEME.zip $THEME
|
|
rm -rf $THEME
|
|
git restore ./
|
|
else
|
|
echo "Please provide the theme slug as an argument to the script."
|
|
fi |