Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nextflow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nfontrod
nextflow
Commits
45ce7f4b
Verified
Commit
45ce7f4b
authored
6 years ago
by
Laurent Modolo
Browse files
Options
Downloads
Patches
Plain Diff
update_tools.sh: auto update for singularity docker and nf modules
parent
789625d7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/update_tools.sh
+71
-0
71 additions, 0 deletions
src/update_tools.sh
with
71 additions
and
0 deletions
src/update_tools.sh
0 → 100755
+
71
−
0
View file @
45ce7f4b
#/bin/sh
# A POSIX variable
OPTIND
=
1
# Initialize our own variables:
tool
=
""
version
=
""
while
getopts
"h?v:t:p:"
opt
;
do
case
"
$opt
"
in
h|
\?
)
echo
"update_tools.sh -t toolname -v tool_version -p tool_previous_version"
exit
0
;;
v
)
version
=
$OPTARG
;;
p
)
prev_version
=
$OPTARG
;;
t
)
tool
=
$OPTARG
;;
esac
done
echo
"tool=
$tool
, version='
$version
'"
docker_tool_dir
=
"src/docker_modules/"
$tool
"/"
echo
$docker_tool_dir
if
[
-d
$docker_tool_dir
]
;
then
echo
"docker module found for
$tool
."
if
[
-d
$docker_tool_dir$version
]
;
then
echo
"version already existing, skipping."
else
cp
-R
$docker_tool_dir$prev_version
$docker_tool_dir$version
sed
-i
"s|
$prev_version
|
$version
|g"
"
$docker_tool_dir$version
/Dockerfile"
sed
-i
"s|
$prev_version
|
$version
|g"
"
$docker_tool_dir$version
/docker_init.sh"
echo
"docker_module for
$tool
:
$version
, done."
fi
else
echo
"docker module not found for '
$tool
', skipping."
fi
singularity_tool_dir
=
"src/singularity_modules/"
$tool
"/"
echo
$singularity_tool_dir
if
[
-d
$singularity_tool_dir
]
;
then
echo
"singularity module found for
$tool
."
if
[
-d
$singularity_tool_dir$version
]
;
then
echo
"version already existing, skipping."
else
cp
-R
$singularity_tool_dir$prev_version
$singularity_tool_dir$version
sed
-i
"s|
$prev_version
|
$version
|g"
"
$singularity_tool_dir$version
/
$tool
.def"
sed
-i
"s|
$prev_version
|
$version
|g"
"
$singularity_tool_dir$version
/build.sh"
echo
"singularity_module for
$tool
:
$version
, done."
fi
else
echo
"singularity module not found for '
$tool
', skipping."
fi
nf_tool_dir
=
"src/nf_modules/"
$tool
"/"
echo
$nf_tool_dir
if
[
-d
$nf_tool_dir
]
;
then
echo
"nf module found for
$tool
."
find
$nf_tool_dir
-maxdepth
1
-mindepth
1
-type
f
-name
"*.config"
|
awk
"{system(
\"
sed -i
\\\"
s|
$prev_version
|
$version
|g
\\\"
\"\$
0)}"
echo
"nf_module for
$tool
:
$version
, done."
else
echo
"nf module not found for '
$tool
', skipping."
fi
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
register
or
sign in
to comment