<commit_before><commit_msg>Initialize script to create missing files and directories<commit_after>#!/bin/bash

#-------------------------------------------------------------------------------
# Initialize Environment
#-------------------------------------------------------------------------------
# 1. Create missing files and directories
# 2. Initialize file system permission
# 3. Configure Apache server
#
# Only after that, you can use artisan commands. Otherwise, error throws.
# You still need to use artisan commands to migrate database and fill seeds.
# You still need to use gulp commands to compile front-end scripts
#

echo "Initialize Local Development Environment"



echo "#1 Creating files and directories"

touch storage/logs/laravel.log
mkdir public/storage
mkdir public/storage/images
mkdir public/storage/avatars

echo "Done!"

echo "#2 Initializing file system permission"

sudo chgrp -R www storage public/storage bootstrap/cache
sudo chmod -R ug-x+rwX,o-wx+rX storage public/storage bootstrap/cache

echo "Done!"

echo "Use artisan and gulp commands to build database and compile assets"
{'fraction_non_alphanumeric': 0.2009009009009009, 'fraction_numerical': 0.0045045045045045045, 'mean_word_length': 2.471875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7607626', 'n_tokens_mistral': 272, 'n_tokens_neox': 253, 'n_words': 115}