使用liquibase工具更改bash更改目录问题

时间:2013-08-21 12:57:23

标签: bash liquibase

function setupMigrationDB(){

   #some other stuff code .. 
   MIGRATIONS_DIR=$8

   cd $MIGRATIONS_DIR   
     liquibase --classpath="${CLASSPATH}"  --driver="${DRIVER}" --username="${DB_ADMIN_USER}" --password="${DB_ADMIN_PWD}" --changeLogFile=update.xml --url="${URL}"  update -Dprefix="${PREFIX}"

   cd ../../
}

setupMigrationsDB arg1 ..... arg7 ./migrations/testdb

我在bash脚本中使用了上述函数。但liquibase工具无法找到相应的目录e。克

 -install[dir]
  --migrations[dir]
  ---testdb[dir] 
 -setup.sh

setup.sh脚本包含上述功能,我尝试将功能内的目录更改为例如  testdb并运行liquibase工具。

 ./setup.sh 

  Liquibase Home: /usr/local/liquibase
  Liquibase Update Failed: /vagrant/testpkg/install/migrations/testdb does not exist

如何修复更改目录问题,以便liquibase找到所需的update.xml文件。 我本来可以提供相对路径,例如./migrations/testdb/update.xml但liquibase不太尊重,bcz它无法包含所有更改日志文件relativeToChangelogFile="true"失败

从命令行运行该工具可以完美地工作,例如 cd ./migrations/testdb && liquibase ......

请帮我解决这个问题

修改

似乎是类似this的类似问题,但我没有得到如何在我的情况下改变脚本

0 个答案:

没有答案
相关问题