forked from c9/install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
link.sh
61 lines (53 loc) · 2.63 KB
/
link.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
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash -e
#=======================================================================#
#========================================================================#
#== This is a very simple version of install.sh script. ==#
#== It tries to find installed versions of cloud9 dependencies ==#
#== and link them to ~/.c9 folder, ==#
#== which can be useful for resource constrained systems ==#
# = = #
#== @for basic editing ==#
#== - node >= 0.10 ==#
#== - nak (find in files) ==#
# = = #
#== @for the terminal ==#
#== - npm ==#
#== - tmux >= 1.8 ==#
#== - pty.js ==#
# = = #
#== @for collaboration (open the IDE with `?collab=0` to skip this) ==#
#== - sqlite3 ==#
#== - [email protected] ==#
# = = #
# = Commands to install required packages before running this script = #
# = (this is incomplete and other packages might be required too) = #
#== Ubuntu sudo apt-get install -y tmux build-essential ==#
#== CentOS sudo yum groupinstall -y development ==#
#== OpenSuse sudo zypper install tmux ==#
#== FreeBSD sudo pkg install -y tmux npm node python gmake ==#
#========================================================================#
#=======================================================================#
#==========================================#
#================= script =================#
C9_DIR="$HOME/.c9";
mkdir -p "$C9_DIR";
cd "$C9_DIR";
# link node
rm -rf node
mkdir -p node/bin
pushd node/bin
ln -s "`which node`" node;
ln -s "`which npm`" npm ;
popd
# link tmux
mkdir -p bin
pushd bin
ln -sf "`which tmux`" tmux
popd
# install required node modules
mkdir -p node_modules
npm i pty.js
npm i sqlite3 [email protected]
npm i https://github.com/c9/nak/tarball/c9
# let cloud9 know that evertyhing is installed
echo 1 > installed