Skip to content

Commit

Permalink
[ci skip] Merge PR 19496
Browse files Browse the repository at this point in the history
Merge PR bioconda#19496, commits were: 
 * Update MOABS with build 1: fix post-link.sh
  • Loading branch information
lijinbio authored and BiocondaBot committed Dec 31, 2019
1 parent ab15a1f commit d9b8291
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion recipes/moabs/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package:
version: {{ version }}

build:
number: 0
number: 1

source:
url: https://github.com/sunnyisgalaxy/moabs/archive/v{{ version }}.tar.gz
Expand Down
33 changes: 19 additions & 14 deletions recipes/moabs/post-link.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,39 @@ function cmd {
local f=$PREFIX/bin/$1
local url=$2
local sha256=$3
wget -q -O "$f" "$url"
local os=$(uname -s)

SUCCESS=0
os=$(uname -s)
if [ "$os" == "Linux" ]
if [ -f "$f" ]
then
shash=$(sha256sum "$f" | cut -f 1 -d ' ')
if [ "$shash" == "$sha256" ]
if [ "$os" == "Linux" ]
then
shash=$(sha256sum "$f" | cut -f 1 -d ' ')
elif [ "$os" == "Darwin" ]
then
SUCCESS=1
shash=$(shasum -a 256 "$f" | cut -f 1 -d ' ')
fi
elif [ "$os" == "Darwin" ]
then
shash=$(shasum -a 256 "$f" | cut -f 1 -d ' ')
if [ "$shash" == "$sha256" ]
then
SUCCESS=1
return 0
fi
fi

if [ $SUCCESS != 1 ]
wget -q -O "$f" "$url"

if [ "$os" == "Linux" ]
then
shash=$(sha256sum "$f" | cut -f 1 -d ' ')
elif [ "$os" == "Darwin" ]
then
shash=$(shasum -a 256 "$f" | cut -f 1 -d ' ')
fi
if [ "$shash" != "$sha256" ]
then
echo "ERROR: post-link.sh was unable to download $f with the sha256 $sha256 from $url at $os." >> "$PREFIX/.messages.txt"
exit -1
fi
}

cmd lut_fet.dat 'https://ndownloader.figshare.com/files/16527371?private_link=44c546b05dd9fa0aee3d' 2f9099e79d6a23764b51220362634acd7412a025464001717ae58acca24a8eb3
# cmd lut_fet.dat 'https://ndownloader.figshare.com/files/16527371?private_link=44c546b05dd9fa0aee3d' 2f9099e79d6a23764b51220362634acd7412a025464001717ae58acca24a8eb3
cmd lut_pdiffCI.dat 'https://ndownloader.figshare.com/files/16527389?private_link=44c546b05dd9fa0aee3d' 98cd92911c9a73267129cb010b1186db7cd248267b58614cc836f78db331902f
cmd lut_pdiffInRegion.dat 'https://ndownloader.figshare.com/files/16527443?private_link=44c546b05dd9fa0aee3d' 6410f059842c11dc62e9452f36f6869edda25d44afc2bd51f9b495c4c3c128e4

0 comments on commit d9b8291

Please sign in to comment.