]>
Commit | Line | Data |
---|---|---|
39ff2fe7 MS |
1 | #!/bin/sh |
2 | # | |
3 | # "$Id$" | |
4 | # | |
5 | # Make an ipptool package for CUPS. | |
6 | # | |
db8b865d | 7 | # Copyright 2007-2013 by Apple Inc. |
39ff2fe7 MS |
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... | |
18 | if 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 | |
24 | fi | |
25 | ||
dcb445bc MS |
26 | uname="`uname | awk '{print tolower($1)}'`" |
27 | if test "x$1" = xlsb; then | |
28 | shift | |
29 | uname="linux-lsb" | |
30 | fi | |
31 | ||
39ff2fe7 MS |
32 | if test $# = 0; then |
33 | echo Updating to get snapshot version... | |
34 | svn up | |
db8b865d | 35 | rev=`svn info . | grep Revision | awk '{print $2}'` |
9b66acc5 | 36 | fileversion="`date '+%Y%m%d'`-r$rev" |
39ff2fe7 MS |
37 | else |
38 | fileversion=$1 | |
39ff2fe7 MS |
39 | fi |
40 | ||
41 | if (svn st | grep -qv '^\?'); then | |
42 | echo Local changes remain: | |
43 | svn st | grep -v '^\?' | |
44 | exit 1 | |
45 | fi | |
46 | ||
47 | echo Creating package directory... | |
48 | pkgdir="ipptool-$fileversion" | |
49 | ||
50 | test -d $pkgdir && rm -r $pkgdir | |
51 | mkdir $pkgdir || exit 1 | |
52 | ||
53 | echo Copying package files | |
9b66acc5 | 54 | cp CHANGES-IPPTOOL.txt IPPTOOL.txt LICENSE.txt $pkgdir |
e5528d42 | 55 | cp doc/help/man-ipp*.html $pkgdir |
9b66acc5 | 56 | cp test/color.jpg $pkgdir |
39ff2fe7 | 57 | cp test/create-printer-subscription.test $pkgdir |
9b66acc5 MS |
58 | cp test/document-*.pdf $pkgdir |
59 | cp test/document-*.ps $pkgdir | |
39ff2fe7 | 60 | cp test/get-completed-jobs.test test/get-jobs.test $pkgdir |
94436c5a | 61 | cp test/get-notifications.test $pkgdir |
c8fef167 | 62 | cp test/get-printer-attributes.test $pkgdir |
94436c5a | 63 | cp test/get-subscriptions.test $pkgdir |
9b66acc5 | 64 | cp test/gray.jpg $pkgdir |
39ff2fe7 | 65 | cp test/ipp-[12].*.test $pkgdir |
db8b865d | 66 | cp test/ipp-everywhere.test $pkgdir |
e5528d42 | 67 | cp test/ippfind-static $pkgdir/ippfind |
39ff2fe7 | 68 | cp test/ipptool-static $pkgdir/ipptool |
9b66acc5 MS |
69 | cp test/onepage-*.pdf $pkgdir |
70 | cp test/onepage-*.ps $pkgdir | |
12f89d24 | 71 | cp test/print-job.test $pkgdir |
db8b865d MS |
72 | cp test/print-job-deflate.test $pkgdir |
73 | cp test/print-job-gzip.test $pkgdir | |
39ff2fe7 | 74 | cp test/testfile.* $pkgdir |
94436c5a | 75 | cp test/validate-job.test $pkgdir |
39ff2fe7 MS |
76 | |
77 | if test `uname` = Darwin; then | |
39ff2fe7 | 78 | pkgfile="$pkgdir-macosx-universal.dmg" |
dcb445bc | 79 | echo Creating disk image $pkgfile... |
39ff2fe7 MS |
80 | test -f $pkgfile && rm $pkgfile |
81 | hdiutil create -srcfolder $pkgdir $pkgfile | |
39ff2fe7 | 82 | else |
dcb445bc MS |
83 | pkgfile="$pkgdir-$uname-`uname -m`.tar.gz" |
84 | echo Creating archive $pkgfile... | |
39ff2fe7 MS |
85 | tar czf $pkgfile $pkgdir || exit 1 |
86 | fi | |
87 | ||
39ff2fe7 MS |
88 | echo Removing temporary files... |
89 | rm -r $pkgdir | |
90 | ||
dcb445bc | 91 | echo Done. |
39ff2fe7 MS |
92 | |
93 | # | |
94 | # End of "$Id$". | |
95 | # |