-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathinstall-module.sh
More file actions
executable file
·75 lines (70 loc) · 1.88 KB
/
install-module.sh
File metadata and controls
executable file
·75 lines (70 loc) · 1.88 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
WORKDIR="modules"
which git &> /dev/null
if [ $? -ne 0 ] ; then
echo "Error: This script requires 'git' to be installed on the system."
exit 1
fi
function fetch() {
repo=""
case "${1}" in
ngx_brotli)
repo="https://github.com/google/ngx_brotli.git"
;;
ngx_cache_purge)
repo="https://github.com/FRiCKLE/ngx_cache_purge.git"
;;
ngx_devel_kit)
repo="https://github.com/simpl/ngx_devel_kit.git"
;;
ngx_drizzle)
repo="https://github.com/chaoslawful/drizzle-nginx-module.git"
;;
ngx_echo)
repo="https://github.com/agentzh/echo-nginx-module.git"
;;
ngx_ench_memcache)
repo="https://github.com/bpaquet/ngx_http_enhanced_memcached_module.git"
;;
ngx_headers_more)
repo="https://github.com/openresty/headers-more-nginx-module.git"
;;
ngx_memc)
repo="https://github.com/agentzh/memc-nginx-module.git"
;;
ngx_mod_zip)
repo="https://github.com/evanmiller/mod_zip.git"
;;
ngx_mongo)
repo="https://github.com/simpl/ngx_mongo.git"
;;
ngx_postgres)
repo="https://github.com/FRiCKLE/ngx_postgres.git"
;;
ngx_redis2)
repo="https://github.com/agentzh/redis2-nginx-module.git"
;;
ngx_rtmp)
repo="https://github.com/arut/nginx-rtmp-module.git"
;;
ngx_set_misc)
repo="https://github.com/agentzh/set-misc-nginx-module.git"
;;
ngx_sphinx2_search)
repo="https://github.com/reeteshranjan/sphinx2-nginx-module.git"
;;
*)
echo "Error: Invalid Module"
exit 1
;;
esac
mkdir -p ${WORKDIR}
if [ -d "${WORKDIR}/${1}" ] ; then
echo "Updating: ${1} ..."
git --git-dir="${WORKDIR}/${1}/.git" --work-tree="${WORKDIR}/${1}" reset --hard origin/master
else
echo "Downloading: ${1} ..."
git clone --recursive ${repo} ${WORKDIR}/${1}
fi
}
fetch ${1}