This repository was archived by the owner on Sep 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
58 lines (53 loc) · 1.38 KB
/
install
File metadata and controls
58 lines (53 loc) · 1.38 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
#
OPT_DEBUG=0
OPT_NPM_INSTALL=0
OPT_PROF_INSTALL=0
clear_eol=$(tput el)
purple=$(tput setaf 5)
cyan=$(tput setaf 14)
#-----------------------------------------------------------------
#
#
#
#-----------------------------------------------------------------
ARGS=("${@}")
for i in ${!ARGS[@]}; do
THIS="${ARGS[$i]:-}"
[ "$THIS" == "--debug" ] && OPT_DEBUG=1
[ "$THIS" == "--prof" ] && OPT_PROF_INSTALL=1
[ "$THIS" == "--npm" ] && OPT_NPM_INSTALL=1
done
[ $OPT_DEBUG -eq 1 ] && set -x
#-----------------------------------------------------------------
#
#
#
#-----------------------------------------------------------------
PATH=$PATH:"$(./bin/hyper-util realpath ./bin)";
dir="${PWD}"
bin_dir="$dir/bin"
cmd="$bin_dir/hyper-cli"
hyper_file="$($cmd config)"
. $hyper_file
echo "$purple Now you can run λyper commands $clear_eol"
#-----------------------------------------------------------------
#
#
#
#-----------------------------------------------------------------
[ $OPT_NPM_INSTALL -eq 1 ] && echo "$(npm --prefix ./src install)"
[ $OPT_PROF_INSTALL -eq 1 ] && echo "$(./bin/hyper-util bash_profile ./.hyper)"
[ $OPT_DEBUG -eq 1 ] && set +x
#-----------------------------------------------------------------
#
#
#
#-----------------------------------------------------------------
unset OPT_DEBUG
unset OPT_NPM_INSTALL
unset OPTERR
unset OPTIND
unset cyan
unset purple
unset clear_eol