/usr/share/ttf2ufm/scripts/mkrel is in ttf2ufm 3.4.4~r2+gbp-1build1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | #!/bin/sh
#
# See COPYRIGHT
#
# Script to create a release or shapshot archive.
# Also checks for very basic inconsistences.
# Expects that it would be run from the current directory of ttf2pt1,
# and that the parent directory is the place to create archives.
# Expects that the CVS environment variables are set properly.
VER=`grep TTF2PT1_VERSION version.h | cut -d\" -f2`
case "$1" in
snapshot)
echo "$VER" | egrep '^[0-9][0-9]*\.[0-9].*-CURRENT$' || {
echo "mkrel: version.h must contain *-CURRENT to create a snapshot" >&2
exit 1
}
grep "^current$" CHANGES.html >/dev/null || {
echo "mkrel: CHANGES.html must list 'current' to create a snapshot" >&2
exit 1
}
snapdate=`date "+ %y %m %d " | sed 's/ \([0-9]\) / 0& /g;s/ //g'`
NEWVER=`echo "$VER" | sed "s/-CURRENT/-SNAP-$snapdate/"`
TAG="-D tomorrow"
;;
release)
echo "$VER" | egrep '^[0-9][0-9]*\.[0-9][.0-9]*$' || {
echo "mkrel: version.h must not be -CURRENT to create a release" >&2
exit 1
}
grep "^$VER -- " CHANGES.html >/dev/null || {
echo "mkrel: CHANGES.html must list the same version as version.h" >&2
exit 1
}
NEWVER="$VER"
TAG=`echo "-r ttf2pt1-$VER" | sed \
's/\(-[0-9][0-9]*\.[0-9]\)$/&.0/;s/\./-/g'`
;;
*)
echo "use: mkrel [snapshot|release]" >&2
exit 1
;;
esac
cd .. || {
echo "mkrel: can't cd to .." >&2
exit 1
}
rm -f ttf2pt1-$NEWVER.tgz ttf2pt1-$NEWVER.zip
rm -rf ttf2pt1-$NEWVER
echo "cvs -z9 export $TAG -d ttf2pt1-$NEWVER ttf2pt1"
cvs -z9 export $TAG -d ttf2pt1-$NEWVER ttf2pt1 || {
echo "mkrel: unable to export from CVS" >&2
echo "mkrel: check that the CVS tree is properly tagged" >&2
exit 1
}
# a little bit more for snapshot: correct the version
(
case "$1" in
snapshot)
cd ttf2pt1-$NEWVER || {
echo "mkrel: can't cd to ../ttf2pt1-$NEWVER" >&2
exit 1
}
sed "s/^current\$/$NEWVER/" <CHANGES.html >CHANGES.html.new \
&& mv CHANGES.html.new CHANGES.html || {
echo "mkrel: can't update CHANGES.html" >&2
exit 1
}
sed "s/\".*-CURRENT\"/\"$NEWVER\"/" <version.h >version.h.new \
&& mv version.h.new version.h || {
echo "mkrel: can't update version.h" >&2
exit 1
}
;;
esac
)
# generate the man pages - in case if the users would have no pod2man
(
cd ttf2pt1-$NEWVER || {
echo "mkrel: can't cd to ../ttf2pt1-$NEWVER" >&2
exit 1
}
make mans
)
tar czvf ttf2pt1-$NEWVER.tgz ttf2pt1-$NEWVER || {
echo "mkrel: can't create .tgz archive" >&2
exit 1
}
zip -u -r ttf2pt1-$NEWVER.zip ttf2pt1-$NEWVER || {
echo "mkrel: can't create .zip archive" >&2
exit 1
}
|