我曾经安装过较旧版本的Liquibase,例如
`wget https://github.com/downloads/liquibase/liquibase/liquibase-2.0.5-bin.tar.gz`
请进行提取并将其移动到所需的位置。我无法在GitHub上找到最新版本的Liquibase。可能已被删除或不可用?
Liquibase下载页面仅有指向SourceForge的链接,请问有人可以帮助我如何从SourceForge使用wget下载软件包吗?
编辑 我不确定GitHub,似乎没有最新版本可用的构建。然而,我的完整脚本看起来像这样:
#!/bin/bash
sudo apt-get update
sudo apt-get install -y openjdk-7-jre-headless
sudo apt-get install -y libmysql-java
LV="3.1.1"
function setupLiquibase(){
source $HOME/.profile
INSTALLED="$(command -v liquibase)"
# if not added already
if [ -z "$LIQUIBASE_HOME" ]
then
echo 'export MYSQL_JCONNECTOR=/usr/share/java/mysql-connector-java.jar'|sudo tee -a $HOME/.profile
echo 'export LIQUIBASE_HOME=/usr/local/liquibase' |sudo tee -a $HOME/.profile
echo 'export PATH=$PATH:$LIQUIBASE_HOME'|sudo tee -a $HOME/.profile
fi
if [ -z "$INSTALLED" ]
then
echo "Installing liquibase $LV "
sudo rm -rf liquibase*
wget http://kaz.dl.sourceforge.net/project/liquibase/Liquibase%20Core/liquibase-"$LV"-bin.tar.gz
gunzip liquibase-"$LV"-bin.tar.gz
sudo mkdir /usr/local/liquibase
sudo tar -xf liquibase-"$LV"-bin.tar -C /usr/local/liquibase
sudo chmod +x /usr/local/liquibase/liquibase
else
INSTALLED="$(liquibase --version)"
echo "Liquibase is already installed, ${INSTALLED}"
fi
}
setupLiquibase