Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

update from SuperBuild #201

Closed
wants to merge 12 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions scripts/UPDATE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,9 @@ git config --global filter.nbstripout.extrakeys '
metadata.celltoolbar metadata.language_info.codemirror_mode.version
metadata.language_info.pygments_lexer metadata.language_info.version'

# Optionally install pre-requisites
if [ $apt_install == 1 ]; then
cd ~/devel/SyneRBI_VM/scripts
sudo -H ./INSTALL_prerequisites_with_apt-get.sh
sudo -H ./INSTALL_python_packages.sh --python "$PYTHON_EXECUTABLE"
sudo -H ./INSTALL_CMake.sh
./configure_gnome.sh
fi

# SuperBuild
SuperBuild(){
echo "==================== SuperBuild ====================="
cd $SIRF_SRC_PATH

SuperBuild_git_update(){
SB_repo=https://github.com/SyneRBI/SIRF-SuperBuild.git
if [ ! -d SIRF-SuperBuild ]
then
Expand All @@ -174,14 +164,20 @@ SuperBuild(){
git fetch --tags --all
fi
# go to SB_TAG
if [ $1 = 'default' ]
if [ "$1" == 'default' ]
then
# get the latest tag matching v
#SB_TAG=`git fetch; git for-each-ref refs/tags/v* --sort=-taggerdate --format='%(refname:short)' --count=1`
SB_TAG=`git tag | xargs -I@ git log --format=format:"%at @%n" -1 @ | sort | awk '{print $2}' | tail -1`
else
SB_TAG=$1
fi
}
# SuperBuild
SuperBuild(){
echo "==================== SuperBuild ====================="
cd $SIRF_SRC_PATH
SuperBuild_git_update "$SB_TAG"
clone_or_pull $SB_repo $SB_TAG
cd ..
buildVM=buildVM
Expand Down Expand Up @@ -288,6 +284,22 @@ update()
build_and_install $*
}

# Optionally install pre-requisites
if [ "$apt_install" == 1 ]; then
cd ~/devel
SuperBuild_git_update "$SB_TAG"
git checkout "$SB_TAG"
cd ~/devel/SIRF-SuperBuild/docker
sudo -H bash raw-ubuntu.sh;
sudo -H bash build_essential-ubuntu.sh;
sudo -H bash build_python-ubuntu.sh;
sudo -H bash build_gadgetron-ubuntu.sh;
sudo -H bash build_system-ubuntu.sh;
cd ~/devel/SyneRBI_VM/scripts
./configure_gnome.sh
exit 0
fi

# Launch the SuperBuild to update
SuperBuild $SB_TAG

Expand Down