File: make-release.sh

package info (click to toggle)
rapmap 0.4.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,428 kB
  • ctags: 3,173
  • sloc: cpp: 16,065; ansic: 3,471; sh: 153; python: 82; makefile: 8
file content (59 lines) | stat: -rwxr-xr-x 1,753 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash

SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
  SOURCE="$(readlink "$SOURCE")"
  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

host=
version=

while getopts "v:n:" opt; do
  case $opt in
    n)
      echo "Host is $OPTARG" >&2
      host=$OPTARG
      ;;
    v)
      echo "Version is $OPTARG" >&2
      version=$OPTARG
      ;;
    \?)
      echo "Invalid option: -$OPTARG" >&2
      exit 1
      ;;
  esac
done

echo -e "Preparing binary release\n=====================\n"
echo -e "Version = ${version}"
echo -e "Host = ${host}"

# create the binary directory 
betaname=RapMap-${version}_${host}
mkdir -p ${DIR}/../RELEASES
mkdir -p ${DIR}/../RELEASES/${betaname}
mkdir -p ${DIR}/../RELEASES/${betaname}/bin
mkdir -p ${DIR}/../RELEASES/${betaname}/lib

echo -e "Copying over the binary\n"
cp ${DIR}/../bin/rapmap ${DIR}/../RELEASES/${betaname}/bin/

# copy other dependencies (shared libraries)
#echo -e "Copying over other shared library dependencies\n"
#bash ${DIR}/../scripts/cpld.bash ${DIR}/../bin/salmon ${DIR}/../RELEASES/${betaname}/lib/
#echo -e "Removing dangerous dependencies\n"
#rm ${DIR}/../RELEASES/${betaname}/lib/libc.so.6
#rm ${DIR}/../RELEASES/${betaname}/lib/ld-linux-x86-64.so.2
#rm ${DIR}/../RELEASES/${betaname}/lib/libdl.so.2
#rm ${DIR}/../RELEASES/${betaname}/lib/libpthread*.so.*

# now make the tarball
echo -e "Making the tarball\n"
cd ${DIR}/../RELEASES
tar czvf ${betaname}.tar.gz ${betaname}

echo -e "Done making release!"