Skip to content

Instantly share code, notes, and snippets.

@sirupsen
Last active August 29, 2015 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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" "git@github.com:openresty/nginx-devel-utils.git"
clone_repo "ndk-nginx-module" "https://github.com/simpl/ngx_devel_kit"
clone_repo "set-misc-nginx-module" "git@github.com:openresty/set-misc-nginx-module.git"
clone_repo "echo-nginx-module" "git@github.com:openresty/echo-nginx-module.git"
clone_repo "memc-nginx-module" "git@github.com:openresty/memc-nginx-module.git"
clone_repo "srcache-nginx-module" "git@github.com:openresty/srcache-nginx-module.git"
clone_repo "lua-upstream-nginx-module" "git@github.com:openresty/lua-upstream-nginx-module.git"
clone_repo "headers-more-nginx-module" "git@github.com:openresty/headers-more-nginx-module.git"
clone_repo "drizzle-nginx-module" "git@github.com:openresty/drizzle-nginx-module.git"
clone_repo "rds-json-nginx-module" "git@github.com:openresty/rds-json-nginx-module.git"
clone_repo "coolkit-nginx-module" "git@github.com:FRiCKLE/ngx_coolkit.git"
clone_repo "redis2-nginx-module" "git@github.com:openresty/redis2-nginx-module.git"
clone_repo "ngx_openresty" "git@github.com:openresty/ngx_openresty.git"
clone_repo "no-pool-nginx" "git@github.com:openresty/no-pool-nginx.git"
clone_repo "test-nginx" "git@github.com: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