1#!/bin/sh
2#
3# Script to make a CUPS root compatible with the darwinup command.  Standard
4# instructions for people getting these roots are:
5#
6#    sudo darwinup install ~/Desktop/cups-LABEL
7#    sudo killall cupsd
8#    cupsctl --debug-logging
9#
10# Usage:
11#
12#   makedarwinup radar-number-or-label
13#
14
15if test $# != 1; then
16	echo "Usage: makedarwinup radar-number-or-label"
17	exit 1
18fi
19
20buildit -project cups -arch i386 -arch x86_64 -offline -archive -archiveName cups-$1 -archiveOutputDir ~/Desktop -dsymsInDstroot -buildAllAliases -noverify . || exit 1
21rm -f ~/Desktop/Shared_cups-$1_HDRDSTROOT_osx.tar.gz
22mv -f ~/Desktop/Shared_cups-$1_DSTROOT_osx.tar.gz ~/Desktop/cups-$1.tar.gz
23
24echo "Send ~/Desktop/cups-$1.tar.gz to tester."
25echo ""
26echo "Commands for tester to run:"
27echo ""
28echo "  sudo darwinup install ~/Desktop/cups-$1.tar.gz"
29echo "  sudo killall cupsd"
30echo "  cupsctl --debug-logging"
31echo ""
32echo "Use the following commands to remove the root:"
33echo ""
34echo "  sudo darwinup uninstall cups-$1.tar.gz"
35echo "  sudo killall cupsd"
36