summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-images
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-06-29 15:51:57 +0000
committerKarl Berry <karl@freefriends.org>2012-06-29 15:51:57 +0000
commit520772644ccb601a941cf22b8f8a8376ba0e49d1 (patch)
treece1493afd118d958650e21bfea5dbdec3753e31a /Master/tlpkg/bin/tl-update-images
parente0b2840cb10719ab8ca5530fc0e04383034011ea (diff)
provide for creating source/bin tars only.
git-svn-id: svn://tug.org/texlive/trunk@26927 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-update-images')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-images58
1 files changed, 40 insertions, 18 deletions
diff --git a/Master/tlpkg/bin/tl-update-images b/Master/tlpkg/bin/tl-update-images
index c0570306433..5fc35839473 100755
--- a/Master/tlpkg/bin/tl-update-images
+++ b/Master/tlpkg/bin/tl-update-images
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
# $Id$
# Create the .iso image(s) for TeX Live.
#
@@ -28,9 +28,12 @@ master=`cd ../.. && /bin/pwd`
test -z "$master" && exit 1
debug=${OVERRIDE_DEBUG-false}
+mkisofs="xorriso -read_mkisofsrc -as mkisofs" # mkisofs
makeinst=true
maketar=true
-mkisofs="xorriso -read_mkisofsrc -as mkisofs" # mkisofs
+tar_all=true
+tar_bin_only=false
+tar_source_only=false
quiet= # for passing to mkisofs
while test $# -gt 0; do
@@ -43,6 +46,8 @@ while test $# -gt 0; do
--notar) maketar=false;;
--quiet) quiet=-quiet;;
--target=*) target=`echo $1 | sed 's/.*=//'`;;
+ --tar-bin-only) tar_all=false; makeinst=false; tar_bin_only=true;;
+ --tar-source-only) tar_all=false; makeinst=false; tar_source_only=true;;
--version) echo "$0 for $NAME-$V ($D)"; exit 0;; # who cares ...
*) echo "$0: unknown option $1; try --help if you need it." >&2; exit 1;;
esac
@@ -99,6 +104,9 @@ MAKEINST ()
cmd="$mkisofs $common_mkisofs_options -o $iso ."
echo "-- `date` with: $cmd"
$cmd
+ if test $? -ne 0; then
+ echo "$0: $mkisofs failed, goodbye." >&2
+ fi
chmod a+rw $iso
rm -rf $imgdir
@@ -128,25 +136,37 @@ MAKEINST ()
# Make the tar files: the sources, the texmf trees, the binaries, the
# minor "extra" files. Each should unpack into its directory name. We
# use the GNU tar --transform option to avoid copying the whole
-# hierarchy to temp directory. This auxiliary function takes that name
-# as its first argument, and the files to archive as the rest.
+# hierarchy to temp directory. This auxiliary function takes the
+# directory to start as its first argument, its directory name as its
+# first argument, and the files to archive as the rest.
#
do_tar ()
{
+ startdir=$1; shift
+ name=$2; shift
+ #
if false; then # ddebug
verbose="-v --show-transformed-names"
else
verbose=
fi
+ #
compress=--xz
- tar_common_opt="--exclude-vcs $compress $verbose"
#
- name=$1
- shift
+ excludes=--exclude-vcs
+ for e in bibtex epstopdf jfontmaps; do # "upstream" sources
+ excludes="$excludes --exclude=extra/$e"
+ done
+ #
+ tar_common_opt="$verbose $compress $excludes"
+ #
tarfile=$target/$name.tar.xz
- tar -cf "$tarfile" --owner=0 --group=0 \
+ tar -C $startdir -cf "$tarfile" --owner=0 --group=0 \
--transform="s,^,$name/," $tar_common_opt \
"$@"
+ if test $? -ne 0; then
+ echo "$0: tar failed, goodbye." >&2
+ fi
(cd $target && sha256sum `basename $tarfile`) >$tarfile.sha256
ls -l "$tarfile"
}
@@ -156,18 +176,20 @@ MAKETAR ()
# remove old tarballs and checksums.
rm -f $target/$NAME-*.tar.*
- cd $master
- do_tar $NAME-$D-extra \
+ if $tar_bin_only || $tar_all; then
+ do_tar $master/bin $NAME-$D-bin *
+ $tar_bin_only && return
+ fi
+
+ if $tar_source_only || $tar_all; then
+ do_tar $master/../Build/source $NAME-$D-source *
+ $tar_source_only && return
+ fi
+
+ do_tar $master $NAME-$D-extra \
LICENSE* README* autorun.inf *.html install* re* tl-* \
tlpkg/TeXLive tlpkg/translations tlpkg/tlpostcode
-
- do_tar $NAME-$D-texmf texmf* || return
-
- cd $master/../Build/source
- do_tar $NAME-$D-source * || return
-
- cd $master/bin
- do_tar $NAME-$D-bin *
+ do_tar $master $NAME-$D-texmf texmf*
}