Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | ############################## |
| 4 | # Data Migration |
| 5 | ############################## |
| 6 | |
| 7 | CURRENT_DIR=`pwd` |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 8 | BASEDIR=$(dirname $1) |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 9 | |
| 10 | if [ ${BASEDIR:0:1} = "/" ] |
| 11 | then |
| 12 | FULL_PATH=$BASEDIR |
| 13 | else |
| 14 | FULL_PATH=$CURRENT_DIR/$BASEDIR |
| 15 | fi |
| 16 | |
| 17 | source ${FULL_PATH}/baseOperation.sh |
| 18 | |
| 19 | mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu" |
| 20 | |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 21 | case $1 in |
| 22 | 1604) |
| 23 | command="java $JVM_LOG_FILE -cp $JARS $mainClass migrate-1602-1604 $@" |
| 24 | echo $command |
| 25 | ;; |
| 26 | 1607) |
| 27 | command="sh ./dataMigration1607.sh $@" |
| 28 | echo $command |
| 29 | ;; |
| 30 | 1610) |
| 31 | command="sh ./dataMigration1610.sh $@" |
| 32 | echo $command |
| 33 | ;; |
| 34 | 1702) |
| 35 | command="sh ./dataMigration1702.sh $@" |
| 36 | echo $command |
| 37 | ;; |
| 38 | 1707) |
| 39 | command="sh ./dataMigration1707.sh $@" |
| 40 | echo $command |
| 41 | ;; |
| 42 | *) |
| 43 | echo "No migration for this version $1" |
| 44 | ;; |
| 45 | esac |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 46 | |
| 47 | $command |
| 48 | result=$? |
| 49 | |
| 50 | echo "***********************************" |
| 51 | echo "***** $result *********************" |
| 52 | echo "***********************************" |
| 53 | |
| 54 | exit $result |
| 55 | |
| 56 | |