-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.bash_profile
More file actions
27 lines (23 loc) · 766 Bytes
/
.bash_profile
File metadata and controls
27 lines (23 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
for file in "$(dirname "$BASH_SOURCE")"/.bash/{colors,linux,functions,exports,shell,completions,aliases,prompt,drush,ssh-agent,overrides}.sh; do
[ -r "$file" ] && source "$file"
done
unset file
# @todo
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
}