Skip to content

Commit

Permalink
Merge pull request #311 from DEploid-dev/issue309
Browse files Browse the repository at this point in the history
resolve #309
  • Loading branch information
shajoezhu authored Oct 31, 2019
2 parents c73e12b + b526b6c commit 7ecc555
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 2 deletions.
13 changes: 12 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ script:
- ./tests/test-against-previous-version.sh
- ./tests/test_binaryReproducible.sh
- if [ $TRAVIS_OS_NAME == linux ]; then cd docs/doxygen; doxygen Doxyfile; cd ../..; fi

- rm -r *
- wget --no-check-certificate https://github.com/DEploid-dev/DEploid/archive/issue309.tar.gz -o /dev/null
- tar -xf issue309.tar.gz
- cd DEploid-issue309
- ./bootstrap
- make; make check
- cd ..; rm -r *
- wget --no-check-certificate https://github.com/DEploid-dev/DEploid/archive/issue309.tar.gz -o /dev/null
- tar -xf issue309.tar.gz
- mv DEploid-issue309/* .
- ./bootstrap
- make; make check
after_success:
- coveralls --exclude lib --exclude tests --exclude src/random --exclude src/codeCogs/ --exclude src/export/ --exclude src/gzstream/ --gcov-options '\-lp'
19 changes: 18 additions & 1 deletion bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,26 @@

rm -r Makefile Makefile.in autom4te.cache config.* depcomp install-sh missing configure aclocal.m4 .deps INSTALL compile test-driver docs/doxygen/Makefile docs/doxygen/Makefile.in

root_dir=$PWD
if [ ! -d "${root_dir}/src" ]; then
"Error: please execute this script from DEploid root directory"
exit 1
fi

echo -n "Preparing ..."
echo ""
echo $root_dir/.git
# First check if this is downloaded from zip or a git clone
if [ -d ${root_dir}/.git ]; then
# use git submodule to down load files
git submodule update --init --recursive
else
./checkfiles.sh
fi # [-f ${root_dir}/.git]
echo " done."


aclocal
autoconf
automake -a
./configure

70 changes: 70 additions & 0 deletions checkfiles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/bin/bash

#if [ ! -z "$src_dir+x" ]; then
src_dir=$PWD/src
#fi

if [ ! -f "${src_dir}/dEploid.cpp" ]; then
"Error: please execute \".checkfiles.sh\" from DEploid root directory"
exit 1
fi


OS=`uname -s`
#echo "operating system is ${OS}"
# VERSION=$(cat VERSION | tr -d '\n')
VERSION=0.1-release
echo -n "." # echo "ok not git clone, now check plot and figure"

#rm master.tar.gz # just making sure download the one we actually want to

extract_submodule_from(){
account=$1
submodule=$2
placeto=$3
echo "Extract submodule $submodule from account $account, place at $3"
if [ ! -d ${submodule}_dir ]; then mkdir ${submodule}_dir; fi
echo -n "." # echo "ok, do something" #

if [[ "${OS}" == "Linux" ]]; then
wget --no-check-certificate https://github.com/${account}/${submodule}/archive/v${VERSION}.tar.gz -o /dev/null
elif [[ "${OS}" == "Darwin"* ]]; then
curl -LOk https://github.com/${account}/${submodule}/archive/v${VERSION}.tar.gz
else
echo "Unknown OS, fail to download package from https://github.com/${account}/${submodule}/archive/v${VERSION}.tar.gz"
echo "Please contact Joe at [email protected] if assistance is needed"
exit 1
fi
ls *gz

if [ ! -f v${VERSION}.tar.gz ]; then
echo "Error: Download package from https://github.com/${account}/${submodule}/archive/v${VERSION}.tar.gz failed"
echo "Please contact Joe at [email protected] if assistance is needed"
exit 1
fi
tar -xf v${VERSION}.tar.gz -C ${submodule}_dir
if [ ! -d ${placeto} ]; then mkdir ${placeto}; fi
cp -r ${submodule}_dir/${submodule}-${VERSION}/* ${placeto}/
rm -r ${submodule}_dir v${VERSION}.tar.gz
}


ACCOUNT=DEploid-dev
SUBMODLUE=DEploid-Utilities
PLACETO=utilities
tmp_dir=$PWD/utilities
if [ -f ${tmp_dir}/DEploidR.R -a -f ${tmp_dir}/dEploidTools.r ];then
echo -n "." # echo "ok, do nothing"
else
extract_submodule_from $ACCOUNT $SUBMODLUE $PLACETO
fi

ACCOUNT=shajoezhu
SUBMODLUE=DEploid-Lasso-lib
PLACETO=$PWD/src/lasso
tmp_dir=$PWD/src/lasso
if [ -f ${tmp_dir}/main.cpp -a -f ${tmp_dir}/README.md ];then
echo -n "." # echo "ok, do nothing"
else
extract_submodule_from $ACCOUNT $SUBMODLUE $PLACETO
fi

0 comments on commit 7ecc555

Please sign in to comment.