2011-09-14 01:40:49 +02:00
|
|
|
if [ -n "`ps auxw | grep batch_server.xml | grep IndexBatchCreator | grep -v grep`" ]; then
|
|
|
|
echo "The gen_index process is already running!"
|
|
|
|
echo "`ps auxw | grep batch_server.xml | grep IndexBatchCreator | grep -v grep`"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ -n "`ps auxw | grep batch_server_upload.xml | grep IndexBatchCreator | grep -v grep`" ]; then
|
|
|
|
echo "The upload process is already running!"
|
|
|
|
echo "`ps auxw | grep batch_server_upload.xml | grep IndexBatchCreator | grep -v grep`"
|
|
|
|
exit 1
|
|
|
|
fi
|
2011-08-29 22:23:52 +02:00
|
|
|
cd ~/gen_indexes
|
|
|
|
rm osmand.log
|
|
|
|
rm console
|
|
|
|
# update map creator
|
2011-09-14 01:40:49 +02:00
|
|
|
rm -fr OsmAndMapCreator
|
|
|
|
mkdir -p OsmAndMapCreator
|
2011-08-29 22:23:52 +02:00
|
|
|
cd OsmAndMapCreator
|
2011-09-14 01:40:49 +02:00
|
|
|
wget http://download.osmand.net/latest-night-build/OsmAndMapCreator-development.zip
|
|
|
|
yes | unzip OsmAndMapCreator-development.zip
|
2011-08-29 22:23:52 +02:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
# remove backup and create new backup
|
2011-09-20 21:18:46 +02:00
|
|
|
# we should not rm, just do incremental updates for now! rm -rf backup
|
|
|
|
mkdir -p backup
|
2011-09-14 01:40:49 +02:00
|
|
|
mv indexes/uploaded/*.* backup
|
2011-08-29 22:23:52 +02:00
|
|
|
|
|
|
|
# remove all previous files
|
2011-09-14 01:40:49 +02:00
|
|
|
rm -rf indexes
|
2011-08-29 22:23:52 +02:00
|
|
|
mkdir indexes
|
|
|
|
mkdir indexes/osm
|
|
|
|
mkdir indexes/uploaded
|
|
|
|
|
|
|
|
#run batch creator
|
|
|
|
./batch_indexing.sh &> console &
|