Skip to content

Commit

Permalink
cleaned and added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
divn committed Apr 15, 2021
1 parent 7cc28ea commit 739d8f0
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions bin/laragon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,6 @@ SCRIPT_VERSION='1.0.4'
# Vars needed for this file to function globally
CURRENTFILE=`basename $0`

if [ "$CURRENTFILE" = "laragon.sh" ]; then
SCRIPTS_LOCATION="$( pwd )"
else
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
ORIGINAL_FILE=$( readlink $DIR/$CURRENTFILE )
SCRIPTS_LOCATION=$( dirname $ORIGINAL_FILE )
fi

echo "-----------------------------------------------------"
echo "createproject start script ${SCRIPT_LABEL}, v${SCRIPT_VERSION}"
echo "-----------------------------------------------------"
echo ""

# Variables
PROJECTS_HOME="c:/laragon/www"
DIR_TO_FILE=$(cd "$(dirname "$1")"; pwd -P)/$(basename "$1")
Expand All @@ -37,6 +24,21 @@ TXTRESET=$(tput sgr0)
YEAR=$(date +%y)
CURRENTFILE=`basename $0`

# Determine scripts location to get imports right
if [ "$CURRENTFILE" = "laragon.sh" ]; then
SCRIPTS_LOCATION="$( pwd )"
else
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
ORIGINAL_FILE=$( readlink $DIR/$CURRENTFILE )
SCRIPTS_LOCATION=$( dirname $ORIGINAL_FILE )
fi

echo "-----------------------------------------------------"
echo "createproject start script ${SCRIPT_LABEL}, v${SCRIPT_VERSION}"
echo "-----------------------------------------------------"
echo ""

# Ask names and credentials
source ${SCRIPTS_LOCATION}/tasks/askvars.sh

# Create project via roots/bedrock based command create-project from our packagist package
Expand All @@ -48,12 +50,17 @@ composer update
# Initialize database
source ${SCRIPTS_LOCATION}/tasks/initdb.sh

# Update .env
source ${SCRIPTS_LOCATION}/tasks/dotenv.sh

# WP-Cli and WP installation
source ${SCRIPTS_LOCATION}/tasks/wp-cli.sh

# Clean up files that are not needed
source ${SCRIPTS_LOCATION}/tasks/cleanups.sh

# Init GitHub company repository
source ${SCRIPTS_LOCATION}/tasks/github.sh

# The end
source ${SCRIPTS_LOCATION}/tasks/footer.sh

0 comments on commit 739d8f0

Please sign in to comment.