annotate update.sh @ 0:ef7cc296f063 draft default tip

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