-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal-bootstrap.sh
executable file
·61 lines (50 loc) · 1020 Bytes
/
global-bootstrap.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
61
#!/bin/bash
PROGRAM_NAME="global"
VERSION="6.6.3"
SRC_FILE="${PROGRAM_NAME}-${VERSION}.tar.gz"
SRC_URL="ftp://ftp.gnu.org/pub/gnu/global/${SRC_FILE}"
CONFIGURE_OPTIONS=" \
--prefix=${HOME}/.local \
--with-exuberant-ctags=/usr/bin/ctags \
"
JNUM="2"
function do_checkenv {
sudo apt-get install -y build-essential ctags libtool-bin
}
function do_fetch {
if [[ ! -d $SRC_FILE ]]; then
wget $SRC_URL
tar xvf $SRC_FILE
fi
}
function do_configure {
if [[ ! -f ./configure ]]; then
exit "the configure is not found."
fi
./configure $CONFIGURE_OPTIONS
}
function do_build {
if [[ ! -f Makefile ]]; then
exit "Makefile is not found."
fi
make -j $JNUM
}
function do_install {
make install
}
set -e
# do_checkenv
do_fetch
pushd "${PROGRAM_NAME}-${VERSION}"
do_configure
do_build
do_install
popd
git clone https://github.com/yoshizow/global-pygments-plugin.git
pushd global-pygments-plugin/
sh reconf.sh
do_configure
do_build
do_install
cp sample.globalrc $HOME/.globalrc
popd