Skip to content

Commit

Permalink
travis: remove unnecessary sudo when installing OpenBLAS at Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-ch committed Dec 14, 2017
1 parent a44de9b commit c4d0374
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .travis/linux/OpenBLAS/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ if [ -e ${CACHE_DIR}/last_commit_id ]; then
if [ "$LAST_COMMIT" != "$CACHED_COMMIT" ]; then
echo "Cache Directory $CACHE_DIR has stale commit"
# if commit is different, delete the cache
rm -rf ${CACHE_DIR}
sudo rm -rf ${CACHE_DIR}
fi
fi

if [ ! -e ${CACHE_DIR}/last_commit_id ]; then
# Clear cache.
rm -rf ${CACHE_DIR}
sudo rm -rf ${CACHE_DIR}

# cache generation
echo "Building cache at $CACHE_DIR"
mkdir ${CACHE_DIR}
sudo git clone --depth=1 git://github.com/xianyi/OpenBLAS
git clone --depth=1 git://github.com/xianyi/OpenBLAS

pushd OpenBLAS
echo OpenBLAS version:$(git rev-parse HEAD)
sudo make FC=gfortran &> /dev/null && sudo make PREFIX=${CACHE_DIR} install
make FC=gfortran &> /dev/null && make PREFIX=${CACHE_DIR} install
echo $(git rev-parse HEAD) > ${CACHE_DIR}/last_commit_id
popd
fi
Expand Down

0 comments on commit c4d0374

Please sign in to comment.