Created
August 23, 2022 05:51
-
-
Save nikunjkotecha/bc36569f508a5bc8764e6f7612c0d928 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
function blt() { | |
if [[ ! -z ${AH_SITE_ENVIRONMENT} ]]; then | |
PROJECT_ROOT="/var/www/html/${AH_SITE_GROUP}.${AH_SITE_ENVIRONMENT}" | |
elif [ "`git rev-parse --show-cdup 2> /dev/null`" != "" ]; then | |
PROJECT_ROOT=$(git rev-parse --show-cdup) | |
else | |
PROJECT_ROOT="." | |
fi | |
if [ -f "$PROJECT_ROOT/vendor/bin/blt" ]; then | |
$PROJECT_ROOT/vendor/bin/blt "$@" | |
# Check for local BLT. | |
elif [ -f "./vendor/bin/blt" ]; then | |
./vendor/bin/blt "$@" | |
else | |
echo "You must run this command from within a BLT-generated project." | |
return 1 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment