Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bioinfo_utils
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Blaise LI
bioinfo_utils
Commits
5f3090e3
Commit
5f3090e3
authored
Sep 17, 2019
by
Blaise Li
Browse files
Options
Downloads
Patches
Plain Diff
Try to ignore environment modules absence.
parent
10a0f0e6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
remove-duplicates-from-sorted-fastq/Haskell/install.sh
+10
-5
10 additions, 5 deletions
remove-duplicates-from-sorted-fastq/Haskell/install.sh
with
10 additions
and
5 deletions
remove-duplicates-from-sorted-fastq/Haskell/install.sh
+
10
−
5
View file @
5f3090e3
...
...
@@ -14,6 +14,11 @@ function error_exit
exit
1
}
function
try_load_gmp_module
{
(
module
--version
2> /dev/null
&&
module load gmp
)
||
:
}
config_file
=
"
${
HOME
}
/.stack/config.yaml"
stack
--version
2> /dev/null
\
...
...
@@ -22,7 +27,7 @@ stack --version 2> /dev/null \
if
[
"
${
config_file
}
"
]
then
stack
exec
--
ghc
--version
>
/dev/null
\
||
(
module
load
gmp
\
||
(
try_
load
_
gmp
_module
\
&&
stack setup
\
&&
INCLUDE_PATH
=
$(
echo
${
CMAKE_INCLUDE_PATH
}
|
tr
":"
","
)
\
&&
LIBRARY_PATH
=
$(
echo
${
CMAKE_LIBRARY_PATH
}
|
tr
":"
","
)
\
...
...
@@ -37,7 +42,7 @@ then
}
else
stack
exec
--
ghc
--version
>
/dev/null
\
||
(
module
load
gmp
&&
stack setup
)
\
||
(
try_
load
_
gmp
_module
&&
stack setup
)
\
||
error_exit
"stack setup failed"
# https://unix.stackexchange.com/a/60690/55127
# Delay variable evaluation in order to adapt to loaded libraries
...
...
@@ -50,13 +55,13 @@ fi
# cd ${HOME} to ignore local project stack config
hlint
--version
2> /dev/null
\
||
(
module
load
gmp
&&
(
cd
${
HOME
}
&&
make_stack_options
&&
stack
${
stack_options
}
install
hlint
))
\
||
(
try_
load
_
gmp
_module
&&
(
cd
${
HOME
}
&&
make_stack_options
&&
stack
${
stack_options
}
install
hlint
))
\
||
error_exit
"hlint install failed"
scan
--version
2> /dev/null
\
||
(
module
load
gmp
&&
(
cd
${
HOME
}
&&
make_stack_options
&&
stack
${
stack_options
}
install
scan
))
\
||
(
try_
load
_
gmp
_module
&&
(
cd
${
HOME
}
&&
make_stack_options
&&
stack
${
stack_options
}
install
scan
))
\
||
error_exit
"scan install failed"
doctest
--version
2> /dev/null
\
||
(
module
load
gmp
&&
(
cd
${
HOME
}
&&
make_stack_options
&&
stack
${
stack_options
}
install
doctest
))
\
||
(
try_
load
_
gmp
_module
&&
(
cd
${
HOME
}
&&
make_stack_options
&&
stack
${
stack_options
}
install
doctest
))
\
||
error_exit
"doctest install failed"
make_stack_options
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment