-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
35 lines (27 loc) · 966 Bytes
/
install.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
#!/bin/sh
# Ported from deno:
# Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
# https://github.com/denoland/deno/blob/master/LICENSE
set -e
devo_uri="https://raw.githubusercontent.com/tokiedokie/devo/master/devo"
deno_install="${DENO_INSTALL:-$HOME/.deno}"
bin_dir="$deno_install/bin"
devo_path="$bin_dir/devo"
if [ ! -d "$bin_dir" ]; then
mkdir -p "$bin_dir"
fi
curl --fail --location --no-progress-meter --output "$devo_path" "$devo_uri"
chmod +x "$devo_path"
echo "devo was installed successfully to $devo_path"
if command -v devo >/dev/null; then
echo "Run 'devo --help' to get started"
else
case $SHELL in
/bin/zsh) shell_profile=".zshrc" ;;
*) shell_profile=".bash_profile" ;;
esac
echo "Manually add the directory to your \$HOME/$shell_profile (or similar)"
echo " export DENO_INSTALL=\"$deno_install\""
echo " export PATH=\"\$DENO_INSTALL/bin:\$PATH\""
echo "Run '$devo_path --help' to get started"
fi