File tree Expand file tree Collapse file tree 2 files changed +34
-10
lines changed Expand file tree Collapse file tree 2 files changed +34
-10
lines changed Original file line number Diff line number Diff line change 1212
1313.. code-block :: bash
1414
15- ./run_mapping .sh < from-path> < to-path> [options] < output-file> < spin-db> [db-port]
15+ ./map-deploy-to-develop .sh < from-path> < to-path> < output-file> [options] < spin-db> [db-port]
1616
1717 Arguments
1818---------
@@ -41,13 +41,13 @@ Run mapping without database:
4141
4242.. code-block :: bash
4343
44- ./run_mapping .sh ./from.tar.gz ./to.whl " " results.txt false
44+ ./map-deploy-to-develop .sh ./from.tar.gz ./to.whl results.txt
4545
4646 Run mapping with database on a custom port:
4747
4848.. code-block :: bash
4949
50- ./run_mapping .sh ./from.tar.gz ./to.whl " Python,Java" output.txt true 5555
50+ ./map-deploy-to-develop .sh ./from.tar.gz ./to.whl output.txt --options " Python,Java" --spin-db --port 5433
5151
5252 Script Actions
5353--------------
@@ -83,10 +83,10 @@ Ensure the script has execute permissions:
8383.. code-block :: bash
8484
8585 sudo su -
86- chmod +x run_d2d .sh
86+ chmod +x map-deploy-to-develop .sh
8787
8888 Then execute:
8989
9090.. code-block :: bash
9191
92- ./run_d2d .sh ...
92+ ./map-deploy-to-develop .sh ...
Original file line number Diff line number Diff line change 33
44FROM_PATH=" $1 "
55TO_PATH=" $2 "
6- D2D_OPTIONS=" $3 "
7- OUTPUT_FILE=" $4 "
8- SPIN_DB=" $5 "
9- DB_PORT=" $6 "
6+ OUTPUT_FILE=" $3 "
7+
8+ D2D_OPTIONS=" "
9+ SPIN_DB=false
10+ DB_PORT=5432
11+
12+
13+ shift 3
14+ while [[ " $# " -gt 0 ]]; do
15+ case " $1 " in
16+ --options)
17+ D2D_OPTIONS=" $2 "
18+ shift 2
19+ ;;
20+ --spin-db)
21+ SPIN_DB=true
22+ shift 1
23+ ;;
24+ --port)
25+ DB_PORT=" $2 "
26+ shift 2
27+ ;;
28+ * )
29+ echo " Unknown parameter: $1 "
30+ exit 1
31+ ;;
32+ esac
33+ done
1034
1135if [ -z " $FROM_PATH " ] || [ -z " $TO_PATH " ] || [ -z " $OUTPUT_FILE " ]; then
1236 echo " Missing required arguments!"
@@ -28,7 +52,7 @@ echo "DB_PORT: $DB_PORT"
2852
2953DB_STARTED=false
3054
31- if [ " $SPIN_DB " = " true" ]; then
55+ if [ " $SPIN_DB " = true ]; then
3256 echo " Starting Postgres container on port $DB_PORT ..."
3357
3458 docker run -d \
You can’t perform that action at this time.
0 commit comments