Skip to content

Commit

Permalink
Merge pull request #1 from zomars/master
Browse files Browse the repository at this point in the history
Removed unused boltflow commands
  • Loading branch information
EzeRangel authored Oct 5, 2017
2 parents 008399e + a6e3ba0 commit 63a2819
Showing 1 changed file with 1 addition and 56 deletions.
57 changes: 1 addition & 56 deletions boltflow.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

PUBLICFOLDER=""
PUBLICFOLDER="public"

echo "⇒ Boltflow 🚀 - version 0.5.3"

Expand All @@ -10,64 +10,18 @@ PWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Store bolt's install directory
WD="$PWD/www"

if [[ $PUBLICFOLDER = "" ]] && [[ -d "$WD/public_html" ]] ; then
PUBLICFOLDER="public_html"
elif [[ $PUBLICFOLDER = "" ]] && [[ -d "$WD/html" ]] ; then
PUBLICFOLDER="html"
elif [[ $PUBLICFOLDER = "" ]] && [[ -d "$WD/public" ]] ; then
PUBLICFOLDER="public"
elif [[ $PUBLICFOLDER = "" ]] ; then
echo ""
echo "ERROR: Could not determine the PUBLICFOLDER. Please edit boltflow.sh, and set PUBLICFOLDER manually."
fi

if [[ $1 = "update" ]] ; then
COMPOSERCOMMAND="update"
else
COMPOSERCOMMAND="install"
fi

if [ -d "$PWD/.git" ]; then
git config core.fileMode false

if ! (git pull) then
printf "\n\n\e[31mGit pull was not successful. Fix what went wrong, and run this script again.\n\n"
exit 1
fi
else
printf "\e[31mNo git repository found.\n"
fi

cd $WD

if [[ $1 = "selfupdate" ]] ; then
curl -O https://raw.githubusercontent.com/bobdenotter/boltflow/master/files/boltflow.sh
chmod a+x ./boltflow.sh
echo "Updated 'boltflow.sh' to the latest version."
exit 1
fi

if [[ $1 = "config_local_dev" ]] ; then
curl -o $WD/app/config/config_local.yml https://gist.githubusercontent.com/zomars/fcb796710cab08e2a73be3ec9097ee52/raw
echo "Fetched 'app/config/config_local.yml' for DEV. Open it in an editor, and edit your credentials."
# TODO: only do this on MacOS
# ${FCEDIT:-${VISUAL:-${EDITOR:-vi}}} $WD/app/config/config_local.yml &
exit 1
fi

if [[ $1 = "config_local_prod" ]] ; then
curl -o $WD/app/config/config_local.yml https://raw.githubusercontent.com/bobdenotter/boltflow/master/files/config_local_prod.yml
echo "Fetched 'app/config/config_local.yml' for PROD. Open it in an editor, and edit your credentials."
# TODO: only do this on MacOS
# ${FCEDIT:-${VISUAL:-${EDITOR:-vi}}} $WD/app/config/config_local.yml &
exit 1
fi

if [[ ! -f "$WD/composer.json" ]] ; then
mv $WD/composer.json.dist $WD/composer.json
fi


if [[ ! -f "$WD/composer.json" ]] ; then
mv $WD/composer.json.dist $WD/composer.json
fi
Expand All @@ -94,15 +48,6 @@ fi

php app/nut cache:clear

if [[ ! -f "$WD/app/config/config_local.yml" ]] ; then
echo ""
echo "Note: No local config is present at 'app/config/config_local.yml'. Run either of the following to get it:"
echo ""
echo "./boltflow.sh config_local_dev"
echo "./boltflow.sh config_local_prod"
echo ""
fi

cd $PWD

echo ""
Expand Down

0 comments on commit 63a2819

Please sign in to comment.