]> git.ipfire.org Git - thirdparty/cups.git/blame - tools/makeipptoolpkg
Update files included with ipptool packages.
[thirdparty/cups.git] / tools / makeipptoolpkg
CommitLineData
c7c21fe6 1#!/bin/sh
2#
3# "$Id$"
4#
5# Make an ipptool package for CUPS.
6#
53093f01 7# Copyright 2007-2013 by Apple Inc.
c7c21fe6 8# Copyright 1997-2007 by Easy Software Products, all rights reserved.
9#
10# These coded instructions, statements, and computer programs are the
11# property of Apple Inc. and are protected by Federal copyright
12# law. Distribution and use rights are outlined in the file "LICENSE.txt"
13# which should have been included with this file. If this file is
14# file is missing or damaged, see the license at "http://www.cups.org/".
15#
16
17# Make sure we are running in the right directory...
18if test ! -f tools/makeipptoolpkg; then
19 echo "Run this script from the top-level CUPS source directory, e.g.:"
20 echo ""
21 echo " tools/makeipptoolpkg $*"
22 echo ""
23 exit 1
24fi
25
411b62c6 26uname="`uname | awk '{print tolower($1)}'`"
27if test "x$1" = xlsb; then
28 shift
29 uname="linux-lsb"
30fi
31
c7c21fe6 32if test $# = 0; then
33 echo Updating to get snapshot version...
34 svn up
f3be9a67 35 rev=`svn info . | grep Revision | awk '{print $2}'`
4822113c 36 fileversion="`date '+%Y%m%d'`-r$rev"
c7c21fe6 37else
38 fileversion=$1
c7c21fe6 39fi
40
41if (svn st | grep -qv '^\?'); then
42 echo Local changes remain:
43 svn st | grep -v '^\?'
44 exit 1
45fi
46
47echo Creating package directory...
48pkgdir="ipptool-$fileversion"
49
445ca81d 50test -d $pkgdir && rm -r $pkgdir
c7c21fe6 51mkdir $pkgdir || exit 1
52
53echo Copying package files
4822113c 54cp CHANGES-IPPTOOL.txt IPPTOOL.txt LICENSE.txt $pkgdir
0a926842 55cp doc/help/man-ipptool*.html $pkgdir
bcc32afb 56cp test/color.jpg $pkgdir
c7c21fe6 57cp test/create-printer-subscription.test $pkgdir
bcc32afb 58cp test/document-*.pdf $pkgdir
59cp test/document-*.ps $pkgdir
c7c21fe6 60cp test/get-completed-jobs.test test/get-jobs.test $pkgdir
8fe85152 61cp test/get-notifications.test $pkgdir
d095822c 62cp test/get-printer-attributes.test $pkgdir
bcc32afb 63cp test/gray.jpg $pkgdir
0a926842 64cp test/ipp-[12].*.test $pkgdir
53093f01 65cp test/ipp-everywhere.test $pkgdir
c7c21fe6 66cp test/ipptool-static $pkgdir/ipptool
bcc32afb 67cp test/onepage-*.pdf $pkgdir
68cp test/onepage-*.ps $pkgdir
ca7d4c34 69cp test/print-job.test $pkgdir
eadcd99c 70cp test/print-job-deflate.test $pkgdir
53093f01 71cp test/print-job-gzip.test $pkgdir
c7c21fe6 72cp test/testfile.* $pkgdir
8fe85152 73cp test/validate-job.test $pkgdir
c7c21fe6 74
75if test `uname` = Darwin; then
0a926842 76 pkgfile="$pkgdir-macosx-universal.dmg"
411b62c6 77 echo Creating disk image $pkgfile...
445ca81d 78 test -f $pkgfile && rm $pkgfile
79 hdiutil create -srcfolder $pkgdir $pkgfile
c7c21fe6 80else
411b62c6 81 pkgfile="$pkgdir-$uname-`uname -m`.tar.gz"
82 echo Creating archive $pkgfile...
c7c21fe6 83 tar czf $pkgfile $pkgdir || exit 1
84fi
85
c7c21fe6 86echo Removing temporary files...
445ca81d 87rm -r $pkgdir
c7c21fe6 88
411b62c6 89echo Done.
c7c21fe6 90
91#
92# End of "$Id$".
93#