-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.sh
36 lines (30 loc) · 820 Bytes
/
setup.sh
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
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
BASEDIR=$(dirname "$0")
# Source command
SOURCE="source"
# Check which shell environrment is executing the script and
# depending on the shell environment change source command
if test -n "$ZSH_VERSION"; then
PROFILE_SHELL=zsh
SOURCE="$SOURCE"
elif test -n "$BASH_VERSION"; then
PROFILE_SHELL=bash
SOURCE="$SOURCE"
elif test -n "$KSH_VERSION"; then
PROFILE_SHELL=ksh
SOURCE="$SOURCE"
elif test -n "$FCEDIT"; then
PROFILE_SHELL=ksh
SOURCE="$SOURCE"
elif test -n "$PS3"; then
PROFILE_SHELL=unknown
SOURCE="$SOURCE"
else
PROFILE_SHELL=sh
SOURCE="$BASEDIR"
fi
echo "[Running]: Script under \`$PROFILE_SHELL\` environment"
# Execute the config configuration
"$SOURCE" "$BASEDIR/scripts/linux/config.sh"
# Execute the build script
"$SOURCE" "$BASEDIR/scripts/linux/build.sh"