Skip to content

Commit 290173d

Browse files
committed
add support for running without git
Funded-by: IDEAS Project: xSDK Time: .1 hour
1 parent 91f274e commit 290173d

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

installxSDK.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,26 @@ if [ ! -d xsdk ]; then
5050
fi
5151
cd xsdk
5252

53-
# This currently requires git, for the release version it will be optional
54-
# TODO check for --with-git=0 option indicating to obtain PETSc from a tarball and not the git repository
55-
5653
#PETSC_BRANCH='barry/downloads'
5754
# Get PETSc
5855
if [ ! -d petsc ]; then
5956
if [ "${WITHGIT}" != "0" ]; then
6057
${WITHGIT} clone https://bitbucket.org/petsc/petsc.git petsc
6158
else
62-
echo "Add code to obtain PETSc tarball"
63-
exit
59+
curl https://bitbucket.org/petsc/petsc/get/master.tar.gz > petsc.tar.gz
60+
dir=`tar -tzf petsc.tar.gz | head -1`
61+
tar zxf petsc.tar.gz
62+
mv -f ${dir} petsc
63+
cd petsc
64+
fi
65+
else
66+
if [ "${WITHGIT}" != "0" ]; then
67+
cd petsc
68+
git fetch
69+
#git checkout $PETSC_BRANCH
70+
git pull
6471
fi
6572
fi
66-
cd petsc
67-
git fetch
68-
#git checkout $PETSC_BRANCH
69-
git pull
7073

7174

7275
# Install the packages

0 commit comments

Comments
 (0)