post-link.sh | searchcode








post-link.sh | searchcode






PageRenderTime 15ms
CodeModel.GetById 8ms
app.highlight 4ms
RepoModel.GetById 1ms
app.codeStats 0ms






/recipes/bioconductor-hgu133afrmavecs/post-link.sh







github.com/bioconda/bioconda-recipes

Shell | 47 lines |
36 code |
5 blank |
6 comment |
13 complexity | 5e338a2d9867e18368f0fcdc64a399c0 MD5 |
raw file




 1#!/bin/bash
 2FN="hgu133afrmavecs_1.5.0.tar.gz"
 3URLS=(
 4  "https://bioconductor.org/packages/3.11/data/annotation/src/contrib/hgu133afrmavecs_1.5.0.tar.gz"
 5  "https://bioarchive.galaxyproject.org/hgu133afrmavecs_1.5.0.tar.gz"
 6  "https://depot.galaxyproject.org/software/bioconductor-hgu133afrmavecs/bioconductor-hgu133afrmavecs_1.5.0_src_all.tar.gz"
 7  "https://depot.galaxyproject.org/software/bioconductor-hgu133afrmavecs/bioconductor-hgu133afrmavecs_1.5.0_src_all.tar.gz"
 8)
 9MD5="85034ab02491f5b3699d210cef50812d"
10
11# Use a staging area in the conda dir rather than temp dirs, both to avoid
12# permission issues as well as to have things downloaded in a predictable
13# manner.
14STAGING=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM
15mkdir -p $STAGING
16TARBALL=$STAGING/$FN
17
18SUCCESS=0
19for URL in ${URLS[@]}; do
20  curl $URL > $TARBALL
21  [[ $? == 0 ]] || continue
22
23  # Platform-specific md5sum checks.
24  if [[ $(uname -s) == "Linux" ]]; then
25    if md5sum -c <<<"$MD5  $TARBALL"; then
26      SUCCESS=1
27      break
28    fi
29  else if [[ $(uname -s) == "Darwin" ]]; then
30    if [[ $(md5 $TARBALL | cut -f4 -d " ") == "$MD5" ]]; then
31      SUCCESS=1
32      break
33    fi
34  fi
35fi
36done
37
38if [[ $SUCCESS != 1 ]]; then
39  echo "ERROR: post-link.sh was unable to download any of the following URLs with the md5sum $MD5:"
40  printf '%sn' "${URLS[@]}"
41  exit 1
42fi
43
44# Install and clean up
45R CMD INSTALL --library=$PREFIX/lib/R/library $TARBALL
46rm $TARBALL
47rmdir $STAGING








searchcode is proudly made in Sydney by ben boyter







Read more here: Source link