Skip to content

Instantly share code, notes, and snippets.

@sirupsen
Last active August 29, 2015 14:28
Show Gist options
  • Save sirupsen/db255ab2ed27a1f9a14a to your computer and use it in GitHub Desktop.
Save sirupsen/db255ab2ed27a1f9a14a to your computer and use it in GitHub Desktop.
Script to set up development environment for ngx-lua
WORKDIR="/home/vagrant/src"
clone_repo() {
local name=$1; shift
local repo=$1; shift
if [[ ! -d "$WORKDIR/$name" ]]; then
git clone "$repo" "$WORKDIR/$name"
fi
}
clone_repo "nginx-devel-utils" "[email protected]:openresty/nginx-devel-utils.git"
clone_repo "ndk-nginx-module" "https://github.com/simpl/ngx_devel_kit"
clone_repo "set-misc-nginx-module" "[email protected]:openresty/set-misc-nginx-module.git"
clone_repo "echo-nginx-module" "[email protected]:openresty/echo-nginx-module.git"
clone_repo "memc-nginx-module" "[email protected]:openresty/memc-nginx-module.git"
clone_repo "srcache-nginx-module" "[email protected]:openresty/srcache-nginx-module.git"
clone_repo "lua-upstream-nginx-module" "[email protected]:openresty/lua-upstream-nginx-module.git"
clone_repo "headers-more-nginx-module" "[email protected]:openresty/headers-more-nginx-module.git"
clone_repo "drizzle-nginx-module" "[email protected]:openresty/drizzle-nginx-module.git"
clone_repo "rds-json-nginx-module" "[email protected]:openresty/rds-json-nginx-module.git"
clone_repo "coolkit-nginx-module" "[email protected]:FRiCKLE/ngx_coolkit.git"
clone_repo "redis2-nginx-module" "[email protected]:openresty/redis2-nginx-module.git"
clone_repo "ngx_openresty" "[email protected]:openresty/ngx_openresty.git"
clone_repo "no-pool-nginx" "[email protected]:openresty/no-pool-nginx.git"
clone_repo "test-nginx" "[email protected]:openresty/test-nginx.git"
if ! command -v axel >/dev/null 2>&1; then
sudo apt-get install -y --no-install-recommends axel
fi
sudo apt-get install -y --no-install-recommends \
libdrizzle-dev \
libgd-dev \
cpanminus
sudo cpanm Test::Nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment