| Server IP : 138.197.176.125 / Your IP : 216.73.216.41 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/crm_easylife/libraries/tcpdf/fonts/ttf2ufm/ttf2ufm-src/scripts/ |
Upload File : |
#!/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
}