Skip to content
Permalink
Browse files

Merge pull request #2645 from cdrini/refactor/remove-dead-init-code

Remove some dead Makefile commands / scripts
  • Loading branch information
mekarpeles committed Nov 19, 2019
2 parents 02ccb3d + 6ca6a23 commit 3bbb234fb26bb95b049aa9c491669f54ae7d0dfa
@@ -4,10 +4,6 @@
#

BUILD=static/build

PYBUNDLE_URL=http://www.archive.org/download/ol_vendor/openlibrary.pybundle
OL_VENDOR=http://www.archive.org/download/ol_vendor
SOLR_VERSION=apache-solr-1.4.0
ACCESS_LOG_FORMAT='%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s"'
GITHUB_EDITOR_WIDTH=127

@@ -48,45 +44,11 @@ distclean:
git clean -fdx
git submodule foreach git clean -fdx

venv:
@echo "** setting up virtualenv **"
mkdir -p var/cache/pip
virtualenv env
./env/bin/pip install --download-cache var/cache/pip $(OL_VENDOR)/openlibrary.pybundle

install_solr:
@echo "** installing solr **"
mkdir -p var/lib/solr var/cache usr/local
wget -c $(OL_VENDOR)/$(SOLR_VERSION).tgz -O var/cache/$(SOLR_VERSION).tgz
cd usr/local && tar xzf ../../var/cache/$(SOLR_VERSION).tgz && ln -fs $(SOLR_VERSION) solr

setup_coverstore:
@echo "** setting up coverstore **"
$(PYTHON) scripts/setup_dev_instance.py --setup-coverstore

setup_ol: git
@echo "** setting up openlibrary webapp **"
$(PYTHON) scripts/setup_dev_instance.py --setup-ol
@# When bootstrapping, PYTHON will not be env/bin/python as env dir won't be there when make is invoked.
@# Invoking make again to pick the right PYTHON.
make all

bootstrap: venv install_solr setup_coverstore setup_ol

run:
$(PYTHON) scripts/openlibrary-server conf/openlibrary.yml

load_sample_data:
@echo "loading sample docs from openlibrary.org website"
$(PYTHON) scripts/copydocs.py --list /people/anand/lists/OL1815L
curl http://localhost:8080/_dev/process_ebooks # hack to show books in returncart

destroy:
@echo Destroying the dev instance.
-dropdb coverstore
-dropdb openlibrary
rm -rf var usr env

reindex-solr:
su postgres -c "psql openlibrary -t -c 'select key from thing' | sed 's/ *//' | grep '^/books/' | PYTHONPATH=$(PWD) xargs python openlibrary/solr/update_work.py -s http://0.0.0.0/ -c conf/openlibrary.yml --data-provider=legacy"
su postgres -c "psql openlibrary -t -c 'select key from thing' | sed 's/ *//' | grep '^/authors/' | PYTHONPATH=$(PWD) xargs python openlibrary/solr/update_work.py -s http://0.0.0.0/ -c conf/openlibrary.yml --data-provider=legacy"
File renamed without changes.
File renamed without changes.

0 comments on commit 3bbb234

Please sign in to comment.
You can’t perform that action at this time.