Skip to content

Instantly share code, notes, and snippets.

@HarryR
Created September 23, 2011 01:38
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 HarryR/1236555 to your computer and use it in GitHub Desktop.
Save HarryR/1236555 to your computer and use it in GitHub Desktop.
Download & setup mongodb
# -----------------
# include mongo-options
MONGO_ARCH := i686
MONGO_VERSION := 2.0.0
MONGO_OS := linux
MONGO_MD5 := 573d8da35806fa3fc5db3305a644852e
# -----------------
MONGO_DIR = mongodb-$(MONGO_OS)-$(MONGO_ARCH)-$(MONGO_VERSION)
TARBALL = $(MONGO_DIR).tgz
TARBALL_URL = http://fastdl.mongodb.org/$(MONGO_OS)/$(TARBALL)
init: data/app/$(MONGO_DIR)
clean:
rm -rf data/app/* data/tmp/*
run:
./launch
data/tmp/$(TARBALL):
if [ ! -d data/tmp ]; then mkdir -p data/tmp ; fi
wget --quiet -O "$@" "$(TARBALL_URL)"
data/app/$(MONGO_DIR): data/tmp/$(TARBALL) data/app
if [ ! -d data/app ]; then mkdir -p data/app ; fi
tar -C data/app -xkzf data/tmp/$(TARBALL)
rm -f data/app/latest
ln -s $(MONGO_DIR) data/app/latest
touch $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment