-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·49 lines (37 loc) · 1.06 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
set -e
platform=
if [[ "$(uname -s)" == "Msys" ]]; then
platform=windows
fi
if [[ "$(uname -s)" == "MINGW64_NT-10.0" ]]; then
platform=windows
fi
if [[ "$(uname -s)" == "Darwin" ]]; then
platform=osx
fi
if [[ "$(uname -s)" == "Linux" ]]; then
platform=osx
fi
if [[ -z "$platform" ]]; then
echo "No platform detected, aborting."
exit
fi
if [[ -z "$HOME" ]]; then
echo "Must set $HOME environment variable, aborting."
exit
fi
{
export HERE="$(cd "$(dirname "$0")" && pwd)"
export OUT="$HOME";
echo "Installing on $platform to $HOME from $HERE"
for project in bash git hg vim zsh tmux psql conemu terminal ssh; do
export HEREP="$HERE/$platform/$project"
export INSTALL_SCRIPT="$HEREP/install.sh"
if [ ! -f "$INSTALL_SCRIPT" ]; then
continue
fi
echo "Installing $project to $OUT"
. "$HEREP/install.sh"
done
}