-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·34 lines (32 loc) · 1004 Bytes
/
install
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
#!/usr/bin/env bash
commands_list=(
gulp
init-gulp
npm
open
opens
m
go
vendors-upgrade
ssh
ssh-with-password
)
if [[ "$1" == "devel" ]]; then
echo "Installing in devel mode..."
for name in "${commands_list[@]}"; do
repo_file_path=bin/${name}
local_file_path=~/.docksal/commands/${name}
(
[[ "$(shasum "$repo_file_path" | awk '{print $1}')" != "$(shasum "$local_file_path" | awk '{print $1}')" ]] &&
echo "Copying 'fin $name' command ..." &&
cp "$repo_file_path" "$local_file_path"
) || echo "File already in place 'fin $name' :)"
done
else
for name in "${commands_list[@]}"; do
echo "Installing 'fin $name' command..."
mkdir -p ~/.docksal/commands/
curl -fsSL "https://raw.githubusercontent.com/Flower7C3/docksal-custom/master/bin/$name?r=${RANDOM}" -o "$HOME/.docksal/commands/$name"
chmod +x "$HOME/.docksal/commands/$name"
done
fi