annotate update.sh @ 14:db6cc184146c draft

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