9 Usage: `basename $0` MODULESET SHA1SUM TARBALL
11 Updates the module associated to TARBALL in MODULESET.
15 # check input arguments
19 if [ -z "$moduleset" ] ||
[ -z "$sha1sum" ] ||
[ -z "$tarball" ]; then
20 echo "error: Not enough arguments" >&2
25 # check that the moduleset exists and is writable
26 if [ ! -w "$moduleset" ]; then
27 echo "error: moduleset \"$moduleset\" does not exist or is not writable" >&2
31 # we only want the tarball name
32 tarball
=`basename $tarball`
34 # pull the module and version from the tarball
36 version
=${tarball##*-}
37 version
=${version%.tar*}
39 # sometimes the jhbuild id doesn't match the tarball name
64 module_id
=pthread-stubs
74 # read the next line until we get />, which should be the end
81 s/$module-[^\"]*\"/$tarball\"/
82 s/version=\"[^\"]*\"/version=\"$version\"/
83 s/hash=\"[^\"]*\"/hash=\"sha1:$sha1sum\"/