annotate update.sh @ 6:42b843627623 draft default tip

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