Skip to content

Instantly share code, notes, and snippets.

@willemvb
Created December 14, 2017 14:06
Show Gist options
  • Save willemvb/dc45bcbc43fbe893db00f69489f5f3bc to your computer and use it in GitHub Desktop.
Save willemvb/dc45bcbc43fbe893db00f69489f5f3bc to your computer and use it in GitHub Desktop.
Blender installation alias
blender-init() {
database=${1:-blender};
echo "";
echo "Database";
echo "------------";
echo "Trying to create database '"$database"'"
echo "create database "$database";" | mysql -u root -p;
echo "";
echo "Laravel";
echo "------------";
cp .env.example .env &>/dev/null;
echo "Copied .env.example";
echo "Running Composer install";
composer install &>/dev/null;
a key:generate &>/dev/null;
echo "Application key generated";
echo "Seeding database";
a migrate:fresh --seed &>/dev/null;
echo "Installing Yarn";
yarn &>/dev/null;
echo "Building assets";
yarn dev &>/dev/null;
echo "";
echo "Finishing up";
echo "------------";
echo "Opening browser"
echo "Blender initialization done!";
open "http://"${PWD##*/}".test";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment