Alien-SVN

 view release on metacpan or  search on metacpan

src/subversion/tools/dist/dist.sh  view on Meta::CPAN

   -e "/#define *SVN_VER_REVISION/s/[0-9]\\+/$REVISION/" \
    < "$vsn_file" > "$vsn_file.tmp"
fi
mv -f "$vsn_file.tmp" "$vsn_file"

echo "Creating svn_version.h.dist, for use in tagging matching tarball..."
cp "$vsn_file" "svn_version.h.dist"

# Don't run autogen.sh when we are building the Windows zip file.
# Windows users don't need the files generated by this command,
# especially not the generated projects or SWIG files.
if [ -z "$ZIP" ] ; then
  echo "Running ./autogen.sh in sandbox, to create ./configure ..."
  (cd "$DISTPATH" && ./autogen.sh --release) || exit 1
fi

# Pre-translate the various sql-derived header files
echo "Generating SQL-derived headers..."
for f in `find "$DISTPATH/subversion" -name '*.sql'`; do
  $PYTHON $DISTPATH/build/transform_sql.py $f `echo $f | sed 's/\.[^\.]*$//'`.h
done

echo "Removing any autom4te.cache directories that might exist..."
find "$DISTPATH" -depth -type d -name 'autom4te*.cache' -exec rm -rf {} \;

if [ -z "$ZIP" ]; then
  # Do not use tar, it's probably GNU tar which produces tar files that are
  # not compliant with POSIX.1 when including filenames longer than 100 chars.
  # Platforms without a tar that understands the GNU tar extension will not
  # be able to extract the resulting tar file.  Use pax to produce POSIX.1
  # tar files.
  echo "Rolling $DISTNAME.tar ..."
  (cd "$DIST_SANDBOX" > /dev/null && pax -x ustar -w "$DISTNAME") > \
    "$DISTNAME.tar"

  echo "Compressing to $DISTNAME.tar.bz2 ..."
  bzip2 -9fk "$DISTNAME.tar"

  # Use the gzip -n flag - this prevents it from storing the original name of
  # the .tar file, and far more importantly, the mtime of the .tar file, in the
  # produced .tar.gz file. This is important, because it makes the gzip
  # encoding reproducable by anyone else who has an similar version of gzip,
  # and also uses "gzip -9n". This means that committers who want to GPG-sign
  # both the .tar.gz and the .tar.bz2 can download the .tar.bz2 (which is
  # smaller), and locally generate an exact duplicate of the official .tar.gz
  # file. This metadata is data on the temporary uncompressed tarball itself,
  # not any of its contents, so there will be no effect on end-users.
  echo "Compressing to $DISTNAME.tar.gz ..."
  gzip -9nf "$DISTNAME.tar"
else
  echo "Rolling $DISTNAME.zip ..."
  (cd "$DIST_SANDBOX" > /dev/null && zip -q -r - "$DISTNAME") > \
    "$DISTNAME.zip"
fi
echo "Removing sandbox..."
rm -rf "$DIST_SANDBOX"

sign_file()
{
  if [ -n "$SIGN" ]; then
    type gpg > /dev/null 2>&1
    if [ $? -eq 0 ]; then
      if test -n "$user"; then
        args="--default-key $user"
      fi
      for ARG in $@
      do
        gpg --armor $args --detach-sign $ARG
      done
    else
      type pgp > /dev/null 2>&1
      if [ $? -eq 0 ]; then
        if test -n "$user"; then
          args="-u $user"
        fi
        for ARG in $@
        do
          pgp -sba $ARG $args
        done
      fi
    fi
  fi
}

# allow md5sum and sha1sum tool names to be overridden
[ -n "$MD5SUM" ] || MD5SUM=md5sum
[ -n "$SHA1SUM" ] || SHA1SUM=sha1sum

echo ""
echo "Done:"
if [ -z "$ZIP" ]; then
  ls -l "$DISTNAME.tar.bz2" "$DISTNAME.tar.gz"
  sign_file $DISTNAME.tar.gz $DISTNAME.tar.bz2
  echo ""
  echo "md5sums:"
  $MD5SUM "$DISTNAME.tar.bz2" "$DISTNAME.tar.gz"
  type $SHA1SUM > /dev/null 2>&1
  if [ $? -eq 0 ]; then
    echo ""
    echo "sha1sums:"
    $SHA1SUM "$DISTNAME.tar.bz2" "$DISTNAME.tar.gz"
  fi
else
  ls -l "$DISTNAME.zip"
  sign_file $DISTNAME.zip
  echo ""
  echo "md5sum:"
  $MD5SUM "$DISTNAME.zip"
  type $SHA1SUM > /dev/null 2>&1
  if [ $? -eq 0 ]; then
    echo ""
    echo "sha1sum:"
    $SHA1SUM "$DISTNAME.zip"
  fi
fi



( run in 0.755 second using v1.01-cache-2.11-cpan-df04353d9ac )