Mercurial > repos > metexplore > met4j
comparison build.sh @ 6:7a6f2380fc1d draft
planemo upload for repository https://forgemia.inra.fr/metexplore/met4j-galaxy
author | metexplore |
---|---|
date | Wed, 17 May 2023 13:26:37 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
5:35c9abcd8934 | 6:7a6f2380fc1d |
---|---|
1 #!/bin/bash | |
2 | |
3 # Check if an argument has been provided for the replacement value | |
4 if [ -z "$1" ]; then | |
5 echo "Usage: $0 version_number" | |
6 exit 1 | |
7 fi | |
8 | |
9 rm -rf build | |
10 | |
11 mkdir -p build/tools | |
12 | |
13 cp -RL tools/*/* build/tools | |
14 | |
15 # cp -RL data build | |
16 | |
17 cp .shed.yml build | |
18 | |
19 # Get the replacement value from the first argument | |
20 # Replace all the "/" by "_" | |
21 replacement_value=$(echo "$1" | sed 's/\//_/g') | |
22 | |
23 # Find all XML files containing the text "MET4J_VERSION_TEST" | |
24 find "build/tools" -type f -name "*.xml" -exec grep -l "MET4J_VERSION_TEST" {} \; | while read file | |
25 do | |
26 # Replace the text "MET4J_VERSION_TEST" with the replacement value specified in the program argument | |
27 sed -i "s/MET4J_VERSION_TEST/$replacement_value/g" "$file" | |
28 done |