diff --git a/bin/compile b/bin/compile index e7078dd..f216a6f 100755 --- a/bin/compile +++ b/bin/compile @@ -1,8 +1,20 @@ #!/usr/bin/env bash set -e -apt-get update -apt-get -y install nginx +CACHEDIR=$2 +NGINX_COMMON=nginx-common_1.2.1-2.2ubuntu0.2_all.deb +NGINX_FULL=nginx-full_1.2.1-2.2ubuntu0.2_amd64.deb +NGINX=nginx_1.2.1-2.2ubuntu0.2_all.deb + +if [[ ! -f "$CACHEDIR/$NGINX" ]]; then + apt-get update + apt-get download nginx nginx-common nginx-full + mv nginx* $CACHEDIR/ +fi + +dpkg -i $CACHEDIR/$NGINX_COMMON +dpkg -i $CACHEDIR/$NGINX_FULL +dpkg -i $CACHEDIR/$NGINX BINDIR=$(dirname "$0")