Changeset 297 in openpam for trunk/dist.sh


Ignore:
Timestamp:
Jan 31, 2005, 3:40:49 PM (14 years ago)
Author:
Dag-Erling Smørgrav
Message:

Dynamically branding a release with today's date has caused trouble
in the past, and it confuses autoconf. From now on, dist.sh will
extract the release date from openpam_version.h.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dist.sh

    r268 r297  
    11#!/bin/sh
    22#
    3 # $P4: //depot/projects/openpam/dist.sh#10 $
     3# $P4: //depot/projects/openpam/dist.sh#11 $
    44#
    55
    66set -e
    77
    8 release=$(date '+%Y%m%d')
     8srcdir=$(dirname $(realpath $0))
     9release=$(perl -ne '/^#define\s+_OPENPAM_VERSION\s+(\d+)/ && print $1' \
     10    $srcdir/include/security/openpam_version.h)
    911distname="openpam-${release}"
    1012tarball="${distname}.tar.gz"
     
    1921    install -c -m 0644 "${file}" "${distname}/${file}" || exit 1
    2022done
    21 for file in autogen.sh configure depcomp install-sh ltconfig ltmain.sh ; do
     23for file in autogen.sh configure depcomp install-sh ltmain.sh ; do
    2224    echo "Adjusting permissions for ${file}"
    2325    chmod a+x "${distname}/${file}"
    24 done
    25 (cd "${distname}" && grep -rl YYYYMMDD *) | while read file ; do
    26     echo "Datestamping ${file}"
    27     perl -p -i -e "s/YYYYMMDD/${release}/g" "${distname}/${file}"
    2826done
    2927find "${distname}" | sort -r | xargs touch -t "${release}0000"
Note: See TracChangeset for help on using the changeset viewer.