Skip to content

Commit

Permalink
Create script to compile and move binaries, ignore them
Browse files Browse the repository at this point in the history
  • Loading branch information
stijndcl committed Feb 6, 2024
1 parent 9fd58af commit 8c854b0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
23 changes: 23 additions & 0 deletions scripts/build_binaries.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#! /usr/bin/env bash

# All references to an external script should be relative to the location of this script.
# See: http://mywiki.wooledge.org/BashFAQ/028
CURRENT_LOCATION="${BASH_SOURCE%/*}"

checkdep() {
which $1 > /dev/null 2>&1 || hash $1 > /dev/null 2>&1 || {
echo "Unipept database builder requires ${2:-$1} to be installed." >&2
exit 1
}
}

checkdep cargo "Rust Toolchain"

# Build binaries and copy them to the /helper_scripts folder
cd $CURRENT_LOCATION/helper_scripts/unipept-database-rs
cargo build --release

for BINARY in "functional-analysis" "lcas" "taxa-by-chunk" "taxons-lineages" "taxons-uniprots-tables" "write-to-chunk" "xml-parser"
do
cp "./target/release/$BINARY" ..
done
8 changes: 8 additions & 0 deletions scripts/helper_scripts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ignore the compiled binaries that get moved here
functional-analysis
lcas
taxa-by-chunk
taxons-lineages
taxons-uniprots-tables
write-to-chunk
xml-parser

0 comments on commit 8c854b0

Please sign in to comment.