-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
71 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash -eu | ||
|
||
BLUE='\033[0;34m' | ||
RED='\033[0;31m' | ||
YELLOW='\033[0;33m' | ||
BOLD='\033[1m' | ||
NC='\033[0m' | ||
ARROW="${BLUE}==>${NC}${BOLD}" | ||
WARN="${RED}Warning${NC}${BOLD}" | ||
ERROR="${RED}Error${NC}${BOLD}" | ||
|
||
print() { | ||
echo -e "$1${NC}" | ||
} | ||
|
||
os_name=$(uname) | ||
dest=~/.relax | ||
|
||
print "$ARROW Check xcode-select" | ||
xcode-select -p > /dev/null | ||
if test 0 -ne $?; then | ||
print "==> Run: xcode-select --install" | ||
if xcode-select --install; then | ||
print "$ERROR Please install the command line developer tools as accoording to a user interface dialog" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
print "$ARROW Fetch relax..." | ||
[[ -d "$dest" ]] && rm -fr "$dest" | ||
git clone https://github.com/SCENEE/relax.git --depth 1 -b master "$dest" | ||
rm -rf "$dest"/sample | ||
|
||
print "${BOLD}Done!${NC}" | ||
cat <<-EOM | ||
Add Relax binary path to your bash profile: | ||
export PATH=\$HOME/.relax/bin:\$PATH | ||
To enable completion, add the following to your bash profile: | ||
if which relax > /dev/null; then source "\$(relax init completion)"; fi | ||
EOM | ||
|