-
Notifications
You must be signed in to change notification settings - Fork 0
/
.envrc
113 lines (89 loc) · 3.52 KB
/
.envrc
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
export BERTHA_PATH="$(pwd)"
dotenv .env.checked_in
local prj_dir=$(pwd)
local o="${prj_dir}/.local/share/bertha/o"
local obin="${o}/bin"
mkdir -p "$obin";
mkdir -p "$o/opt";
export PATH="${obin}":"${o}/opt/clyde/inst/bin":"${o}/opt/haxe/":"${o}/opt/neko/":"${o}/opt/hashlink/":${PATH}
export BERTHA_PATH="${prj_dir}"
PATH_add "${prj_dir}/.local/share/bertha/i/bin"
layout python3
# 2>&1 >/dev/null
pip install -r requirements.txt >/dev/null
virtualenv ${prj_dir}/.local/share/bertha/o/bertha_pyenv >/dev/null
#install-release config --path="$BERTHA_PATH/.local/share/bertha/o" >/dev/null
# echo $prj_dir
if (! test -f "$obin/eget"); then
curl -o eget.sh https://zyedidia.github.io/eget.sh
sh eget.sh
mv $prj_dir/eget $obin
rm eget.sh
fi
if (! test -f "$obin/bb"); then
# ARCH=`uname -p`
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
eget https://github.com/babashka/babashka/ --asset="static.tar.gz" --to ${obin}
elif [[ "$OSTYPE" == "darwin"* ]]; then
eget https://github.com/babashka/babashka/ --to ${obin}
elif [[ "$OSTYPE" == "cygwin" ]]; then
eget https://github.com/babashka/babashka/ --to ${obin}
elif [[ "$OSTYPE" == "msys" ]]; then
eget https://github.com/babashka/babashka/ --to ${obin}
elif [[ "$OSTYPE" == "win32" ]]; then
eget https://github.com/babashka/babashka/ --to ${obin}
fi
fi
# if (! test -f "$obin/vfox"); then
# eget https://github.com/version-fox/vfox/ --asset="tar" --to ${obin}
# fi
if (! test -f "$obin/deno"); then
eget https://github.com/denoland/deno --asset="deno-" --to ${obin}
fi
if (! test -f "$obin/clyde"); then
eget https://github.com/agateau/clyde --to ${obin}
clyde setup
clyde install xh 2>&1 >/dev/null
clyde install mkcert 2>&1 >/dev/null
fi
if (! test -f "$obin/aim"); then
eget https://github.com/mihaigalos/aim/ --asset="gnu" --to ${obin}
fi
if (! test -d "${o}/opt/neko"); then
local os_name=$(bb run localhost.os.name)
if [[ "$os_name" == "Linux" ]]; then
mkdir -p "${o}/opt/neko"
wget -qO- https://github.com/HaxeFoundation/neko/releases/download/v2-3-0/neko-2.3.0-linux64.tar.gz | tar xvz -C "${o}/opt/neko" --strip-components=1
fi
# wget -qO- your_link_here | tar xvz -C /targ/et/directory
# mkdir -p "${o}/opt/neko"
# dra download -a --install HaxeFoundation/neko/ --output "${o}/opt/neko"
# # eget https://github.com/haxeFoundation/neko -f="*/*" --all --to "${o}/opt/neko"
# gh-release-install --extract "*" "HaxeFoundation/neko" "neko-2.3.0-linux.tar.gz" "${o}/opt/neko"
fi
if (! test -d "${o}/opt/haxe"); then
eget https://github.com/haxeFoundation/haxe -f="*/*" --all --to "${o}/opt/haxe"
fi
if (! test -d "${o}/opt/hashlink"); then
eget https://github.com/haxeFoundation/hashlink --tag latest -f="*/*" --all --to "${o}/opt/hashlink"
fi
#TODO use clyde package
if (! test -f "$obin/rclone"); then
eget https://github.com/rclone/rclone --asset=".zip" --to ${obin}
fi
if (! test -f "$obin/lefthook"); then
eget https://github.com/evilmartians/lefthook --asset="gz" --to ${obin}
fi
if (! test -f "$obin/xc"); then
eget https://github.com/joerdav/xc/ --asset=".tar.gz" --to ${obin}
fi
if ! [ -s $HOME/.config/bertha.env ]; then
echo "BERTHA_PATH=$BERTHA_PATH" > $HOME/.config/bertha.env
fi
# export RCLONE_CONFIG_HAXELOT_TYPE=union
# # export RCLONE_CONFIG_HAXELOT_UPSTREAMS="${prj_dir}/.haxelib "
# export RCLONE_CONFIG_HAXELOT_ALLOW_OTHER=1
# export RCLONE_CONFIG_HAXELOT_ALLOW_ROOT=1
# export RCLONE_CONFIG_HAXELOT_ALLOW_NON_EMPTY=1
# export RCLONE_CONFIG_LOCAL_DAEMON=true
# export RCLONE_CONFIG_LOCAL_DAEMON_WAIT=0