forked from koding/kpm-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkpm.sh
44 lines (40 loc) · 771 Bytes
/
kpm.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
#!/usr/bin/env sh
#
# # Koding Package Manager Installer
#
# The following script is a shorthand script, used as a frontend
# for the actual installer (located in ./os/kpm/install). This script
# is **not** run by KPM at all.
#
main()
{
# ## Get the platform
platform=`uname | tr '[:upper:]' '[:lower:]'`
os=""
case "$platform" in
darwin)
os="osx"
;;
linux)
# The only supported linux distro currently
os="ubuntu"
;;
windows)
os="$platform"
;;
*)
cat << EOF
Error 84: Unknown platform.
EOF
exit 84
;;
esac
branch='master'
if [ "$KPM_DEVELOP" = "true" ]; then
branch='develop'
fi
# ## Pipe the actual installer
curl -sSL "https://raw.githubusercontent.com/koding/kpm-scripts/$branch/$os/kpm/install" | bash
exit $?
}
main