-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.envrc
31 lines (30 loc) · 837 Bytes
/
.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
while true; do
printf "\e[1m[Choose a mode from the following options]\e[0m\n"
printf " 1. native\n"
printf " 2. wasm\n"
printf "Enter mode (number or name) or enter for default [1]: "
read MODE
if [[ -z "$MODE" ]]; then
MODE_PARSED="native"
elif [[ "$MODE" = "1" ]]; then
MODE_PARSED="native"
elif [[ "$MODE" = "native" ]]; then
MODE_PARSED="native"
elif [[ "$MODE" = "2" ]]; then
MODE_PARSED="wasm"
elif [[ "$MODE" = "wasm" ]]; then
MODE_PARSED="wasm"
else
printf "Could not parse mode: \"${MODE}\"\n\n"
continue
fi
break
done
if [[ "${MODE_PARSED}" = "native" ]]; then
use flake
elif [[ "${MODE_PARSED}" = "wasm" ]]; then
use flake '.#packages.x86_64-linux.wasm'
else
echo "Something went wrong."
exit 1
fi