build: skip downloading python indexer if correct version is already installed

This commit is contained in:
mlangkabel
2019-11-05 11:28:50 +01:00
parent 38581f9571
commit 8264b8cae3
+16
View File
@@ -36,6 +36,22 @@ ROOT_DIR=$ROOT_DIR/..
# Enter main directory
cd $ROOT_DIR/
if [ -e "$TARGET_PATH/SourcetrailPythonIndexer.exe" ]; then
echo "SourcetrailPythonIndexer already exists, checking version..."
INSTALLED_VERSION="$($TARGET_PATH/SourcetrailPythonIndexer.exe --version)"
INSTALLED_VERSION="$(sed -e 's#.* \(\)#\1#' <<< $INSTALLED_VERSION)"
echo "SourcetrailPythonIndexer version is: $INSTALLED_VERSION"
INSTALLED_VERSION="$(echo $INSTALLED_VERSION | tr . _)"
if [ $INSTALLED_VERSION == $SOURCETRAIL_PYTHON_INDEXER_VERSION ]; then
echo "Nothing to update. Target version of SourcetrailPythonIndexer is already installed."
exit
fi
fi
mkdir -p $TEMP_PATH
echo -e $INFO "starting to download $PACKAGE_FILE_NAME"