File: bootstrap-latest.bat

package info (click to toggle)
gnumed-server 21.11-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 45,408 kB
  • ctags: 3,891
  • sloc: sql: 1,210,640; python: 13,526; sh: 1,476; makefile: 19
file content (40 lines) | stat: -rw-r--r-- 1,183 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@echo off

SET DRIVE_LTR=%~d0
cd /d %~dp0
REM command line options:
REM quiet

SET VER=21
SET PREV_VER=20
SET LASTVERSIONSTODROP=19
SET QUIET=%1

SET PYTHONPATH="%PYTHONPATH%;../../"


echo ===========================================================
echo Bootstrapping latest GNUmed database.

echo This will set up a GNUmed database of version %VER%
echo with the name gnumed_v%VER%
echo It contains all the currently working parts including
echo localizations for countries you don't live in. This does
echo not disturb the operation of the GNUmed client in your
echo country in any way.
echo ===========================================================

echo bootstrapping databases ...

COLOR 0E
SET LOG=bootstrap-latest.log
SET CONF=bootstrap-latest.conf
bootstrap_gm_db_system.py --log-file=%LOG% --conf-file=%CONF%


echo ============================================================
echo Dropping staging databases. You might have to enter the 
echo password for 'postgres' unless it is provided.
echo ============================================================

for /l %%X in (2,1,%LASTVERSIONSTODROP%) do dropdb -U postgres gnumed_v%%X