[PATCH modular 15/15] release.sh: Update jhbuild moduleset with --moduleset

Dan Nicholson dbn.lists at gmail.com
Tue Mar 8 05:19:38 PST 2011


On Tue, Mar 8, 2011 at 1:11 AM, Dirk Wallenstein <halsmit at t-online.de> wrote:
> On Sun, Mar 06, 2011 at 09:30:00AM -0800, Dan Nicholson wrote:
>> In order to keep the katamari moduleset up to date with current tarball
>> information, have release.sh update the file when new releases are made.
>> This is enabled by passing a module file with --moduleset.
>>
>> Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
>> ---
>>  release.sh |   23 +++++++++++++++++++++++
>>  1 files changed, 23 insertions(+), 0 deletions(-)
>>
>> diff --git a/release.sh b/release.sh
>> index ea4d9c9..a88a0c0 100755
>> --- a/release.sh
>> +++ b/release.sh
>> @@ -12,6 +12,7 @@ host_xorg=xorg.freedesktop.org
>>  host_dri=dri.freedesktop.org
>>  user=
>>  remote=origin
>> +moduleset=
>>
>>  usage()
>>  {
>> @@ -24,6 +25,7 @@ Options:
>>    --help        this help message
>>    --ignore-local-changes        don't abort on uncommitted local changes
>>    --remote      git remote where the change should be pushed (default "origin")
>> +  --moduleset   jhbuild moduleset to update with relase info
>>  HELP
>>  }
>>
>> @@ -107,6 +109,11 @@ while [ $# != 0 ]; do
>>          remote=$1
>>          shift
>>          ;;
>> +    --moduleset)
>> +        shift
>> +        moduleset=$1
>> +        shift
>> +        ;;
>>      --*)
>>          echo "error: unknown option"
>>          usage
>> @@ -198,6 +205,14 @@ if [ -z "$tag_previous" ] ||
>>      exit 1
>>  fi
>>
>> +if [ -n "$moduleset" ]; then
>> +    echo "checking for moduleset"
>> +    if ! [ -w "$moduleset" ]; then
>> +        echo "moduleset $moduleset does not exist or is not writable"
>> +        exit 1
>> +    fi
>> +fi
>> +
>>  if [ "$section" = "libdrm" ]; then
>>      section_path="libdrm"
>>      srv_path="/srv/$host_dri/www/$section_path"
>> @@ -236,6 +251,14 @@ echo "generating announce mail template, remember to sign it"
>>  gen_announce_mail >$announce
>>  echo "    at: $announce"
>>
>> +if [ -n "$moduleset" ]; then
>> +    echo "updating moduleset $moduleset"
>> +    modulardir=`dirname "$0"`
>> +    # pass sha1sum output as 2 arguments
>> +    sha1sum=`cd $tarball_dir && $SHA1SUM $targz`
>> +    $modulardir/update-moduleset.sh $moduleset $sha1sum
>
> The $targz argument is missing here.

I tried to explain this in the comment. The output of sha1sum is 2
pieces: the hash and the file. So, $targz is built into $sha1sum. That
may seem a little too magical, but it also seemed silly to split the
sha1sum output only to tack back on the tarball. This is also why I
reordered the arguments in update-moduleset.sh. What do you think?

--
Dan


More information about the xorg-devel mailing list