diff options
author | jlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2007-05-24 18:54:11 +0000 |
---|---|---|
committer | jlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2007-05-24 18:54:11 +0000 |
commit | 3d8365b8dc12c660de084e4047b8648fc377ed16 (patch) | |
tree | 64bc02033c67a4fbfea9a20b39be54506f18f9ae /tools | |
parent | b94498cfba64422f0f21181b0c51cc0bed7c7d92 (diff) |
Load cups into easysw/current.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@326 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/makebuttons | 34 | ||||
-rwxr-xr-x | tools/testosx | 20 |
2 files changed, 35 insertions, 19 deletions
diff --git a/tools/makebuttons b/tools/makebuttons index a6f5b41af..b31700bfe 100755 --- a/tools/makebuttons +++ b/tools/makebuttons @@ -34,7 +34,7 @@ # # Usage: # -# tools/makebuttons locale buttons.txt +# tools/makebuttons [--font filename] locale buttons.txt # # "Locale" is the locale name, either "ll" or "ll_CC" where "ll" is the # 2-letter language abbreviation and "CC" is the 2-letter ISO country @@ -59,8 +59,25 @@ # "tools/buttons.txt" for inspiration... # +# Bitstream Vera font... +font="fonts/Vera.ttf" + +# Colors +background="#d4d4a4" +black="#000000" +green="#009900" +red="#cc0000" +standard="#666633" + + +if test "x$1" == x--font; then + shift + font="$1" + shift +fi + if test $# -lt 2; then - echo Usage: tools/makebuttons locale buttons.txt + echo Usage: tools/makebuttons "[--font filename]" locale buttons.txt exit 1 elif test ! -d tools; then echo ERROR: You MUST run the makebuttons script from the main CUPS source directory! @@ -82,17 +99,6 @@ elif test ! -r $list; then fi -# Bitstream Vera font... -font="fonts/Vera.ttf" - -# Colors -background="#d4d4a4" -black="#000000" -green="#009900" -red="#cc0000" -standard="#666633" - - # 'generate_button()' - Create a button image. # # Arg 1: button filename (WITH .gif extension!) @@ -168,7 +174,7 @@ function generate_button() txt_h=`identify -format "%h" $tmp_btn` txt_w=`identify -format "%w" $tmp_btn` - if test $txt_h -gt 32; then + if test $txt_h -gt 40; then echo "ERROR: 2 lines maximum for the button text" exit 1 fi diff --git a/tools/testosx b/tools/testosx index 92cc03063..8f0be2710 100755 --- a/tools/testosx +++ b/tools/testosx @@ -34,26 +34,36 @@ sed -e '1,$s/@CUPS_VERSION@/'$version'/g' \ <packaging/WELCOME.rtf >$pkgdir/Resources/Welcome.rtf cp packaging/installer.tif $pkgdir/Resources/background.tif -cat >$pkgdir/Resources/preflight <<EOF +if test -x /bin/launchctl; then + cat >$pkgdir/Resources/preflight <<EOF +#!/bin/sh +# Tell launchd to reload cupsd... +launchctl stop org.cups.cups-lpd || exit 0 +launchctl stop org.cups.cupsd || exit 0 +launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist || exit 0 +launchctl unload /System/Library/LaunchDaemons/org.cups.cups-lpd.plist || exit 0 +EOF +else + cat >$pkgdir/Resources/preflight <<EOF #!/bin/sh # Stop any running cupsd processes... killall cupsd || exit 0 EOF +fi + chmod 755 $pkgdir/Resources/preflight if test -x /bin/launchctl; then cat >$pkgdir/Resources/postflight <<EOF #!/bin/sh -# Remove old startup item and xinetd config file, we use launchd now... -rm -f /System/Library/StartupItems/PrintingServices/PrintingServices +# Remove old xinetd config file, we use launchd now... rm -f /etc/xinetd.d/cups-lpd # Tell launchd to reload cupsd... -launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist || exit 0 -launchctl unload /System/Library/LaunchDaemons/org.cups.cups-lpd.plist || exit 0 launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist launchctl load /System/Library/LaunchDaemons/org.cups.cupsd-lpd.plist || exit 0 +launchctl start org.cups.cupsd EOF else cat >$pkgdir/Resources/postflight <<EOF |