-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·23 lines (20 loc) · 842 Bytes
/
build.sh
File metadata and controls
executable file
·23 lines (20 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# Dynamically creating R directory upon building
# And populating it with links to R scripts with `@export`-s
# Now documentation will be correctly generated
mkdir R
find inst -type f -name "*.R" -exec sh -c '
for file; do
if grep -q "@export" "$file"; then
ln -sf "$(realpath "$file")" "R/$(basename "$file")"
fi
done
' sh {} +
Rscript -e 'devtools::document()'
Rscript -e 'devtools::install()'
# Linking executable scripts to PATH
ln -sf $PREFIX/lib/R/library/pannagram/features.sh $PREFIX/bin/features
ln -sf $PREFIX/lib/R/library/pannagram/pannagram.sh $PREFIX/bin/pannagram
ln -sf $PREFIX/lib/R/library/pannagram/pannagram_f.sh $PREFIX/bin/pannagram_f
ln -sf $PREFIX/lib/R/library/pannagram/simsearch.sh $PREFIX/bin/simsearch
ln -sf $PREFIX/lib/R/library/pannagram/chromotools.sh $PREFIX/bin/chromotools