annotate galaxyp-galaxyp-toolshed-msconvert-d5dd196252d2/update.sh @ 6:ffe1dca94595 draft

Uploaded
author galaxyp
date Mon, 17 Feb 2014 16:42:53 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
1 #!/bin/bash
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
2
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
3 LICENSE_FILE=LICENSE
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
4 # Ensure repository contains license file.
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
5 if [ ! -e "$LICENSE_FILE" ];
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
6 then
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
7 wget http://www.apache.org/licenses/LICENSE-2.0.txt -O "$LICENSE_FILE"
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
8 fi
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
9
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
10 # Run repository specific update actions.
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
11 if [ -f update_repo.sh ];
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
12 then
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
13 ./update_repo.sh
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
14 fi
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
15
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
16 wget https://raw.github.com/gist/3749747/README_GALAXYP.md -O README_GALAXYP.md
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
17
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
18 # Create repository README
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
19 if [ ! -e README_REPO.md ];
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
20 then
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
21 echo "TODO: Document this tool repository." > README_REPO.md
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
22 fi
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
23 cat README_REPO.md README_GALAXYP.md > README.md
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
24
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
25
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
26 # If version file exists, update all tools to this version
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
27 VERSION_FILE=version
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
28 if [ -e "$VERSION_FILE" ];
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
29 then
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
30 VERSION=`cat $VERSION_FILE`
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
31
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
32 # Replace tool version in each tool XML file `
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
33 find -iname "*xml" -exec sed -i'' -e '0,/version="\(.\+\)"/s/version="\(.\+\)"/version="'$VERSION'"/1g' {} \;
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
34
ffe1dca94595 Uploaded
galaxyp
parents:
diff changeset
35 fi