blob: e1f4f24a301778ac5ecc8b15495499bd19c2f6ad [file] [log] [blame]
Michael Lando451a3402017-02-19 10:28:42 +02001#!/bin/bash
2
3##############################
4# Data Migration
5##############################
6
7CURRENT_DIR=`pwd`
Michael Landoed64b5e2017-06-09 03:19:04 +03008BASEDIR=$(dirname $1)
Michael Lando451a3402017-02-19 10:28:42 +02009
10if [ ${BASEDIR:0:1} = "/" ]
11then
12 FULL_PATH=$BASEDIR
13else
14 FULL_PATH=$CURRENT_DIR/$BASEDIR
15fi
16
17source ${FULL_PATH}/baseOperation.sh
18
19mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
20
Michael Landoed64b5e2017-06-09 03:19:04 +030021case $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 ;;
45esac
Michael Lando451a3402017-02-19 10:28:42 +020046
47$command
48result=$?
49
50echo "***********************************"
51echo "***** $result *********************"
52echo "***********************************"
53
54exit $result
55
56