File tree Expand file tree Collapse file tree 1 file changed +14
-15
lines changed
Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -5,23 +5,22 @@ DB_USER=sa
55DB_PASSWD=
66SQL_BACKUP_FILENAME=KeepTime_database-export_H2-version-$H2_VERSION .sql
77
8- echo Get H2 jar from KeepTime jar ....
9- jar xf keeptime-1.2.0-SNAPSHOT.jar
10- rm -r org
11- rm -r META-INF
12- echo
8+ echo " Script to export the content of H2 databse from KeepTime version 1.2.0-SNAPSHOT to .sql file."
9+ echo " The script should be placed next to the .jar file."
10+ read -p " Press enter to continue"
1311
12+ echo -e " \nExtracting H2 driver from KeepTime .jar file."
1413DRIVER_JAR_FROM_KEEPTIME=BOOT-INF/lib/h2-$H2_VERSION .jar
14+ jar xfv keeptime-1.2.0-SNAPSHOT.jar $DRIVER_JAR_FROM_KEEPTIME
1515
16- echo Filename : $SQL_BACKUP_FILENAME
17- echo
18- echo Location :
19- pwd
20- echo
16+ echo -e " \nTriggering database backup."
17+ java -cp $DRIVER_JAR_FROM_KEEPTIME org.h2.tools.Script -url $DB_URL -user $DB_USER -script $SQL_BACKUP_FILENAME -options DROP
2118
22-
23- java -cp $DRIVER_JAR_FROM_KEEPTIME org.h2.tools.Script -url $DB_URL -user $DB_USER -script $SQL_BACKUP_FILENAME -options DROP
24- rm -r BOOT-INF
19+ echo -e " \nCleanup of extracted .jar file."
20+ rm -rv BOOT-INF
2521
26- echo delete Files from unzipping KeepTime
27- echo Export succeeded
22+ echo -e " \nIf no error occured the export has succeeded."
23+ echo " The exported file was created at '$( pwd) /$SQL_BACKUP_FILENAME '."
24+ echo -e " \nYou can now import this file in a new version of KeepTime.\n"
25+
26+ read -p " All set. Press enter to exit script."
You can’t perform that action at this time.
0 commit comments