Created
December 28, 2017 08:46
-
-
Save ScarlettSamantha/5c8f737c0422684dad926484255ea44b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/env/bash | |
if [ -z "$1" ] | |
then | |
echo "No theme name supplied as script argument." | |
exit 1 | |
fi | |
BASH_RC=~/.bashrc | |
MAGE_ROOT=~/magento2 | |
TOOLS_FOLDER=~/tools | |
YARN_ALIAS = "alias yarn='/data/web/tools/node_modules/yarn/bin/yarn'" | |
GULP_CLI_ALIAS = "alias gulp-cli='/data/web/tools/node_modules/gulp-cli/bin/gulp.js'" | |
GULP_ALIAS = "alias gulp='/data/web/tools/node_modules/gulp/bin/gulp.js'" | |
cd ~/ | |
mkdir "$TOOLS_FOLDER" | |
cd "$TOOLS_FOLDER" | |
npm install gulp-install yarn gulp-cli gulp-clean | |
cat "$YARN_ALIAS" >> "$BASH_RC" | |
cat "$GULP_CLI_ALIAS" >> "$BASH_RC" | |
cat "$GULP_ALIAS" >> "$BASH_RC" | |
source "$BASH_RC" | |
cd "$MAGE_ROOT" | |
gulp styles --theme "$1" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment