Chromium Code Reviews| Index: cloud_print/virtual_driver/posix/mac_packaging/install.sh |
| diff --git a/cloud_print/virtual_driver/posix/mac_packaging/install.sh b/cloud_print/virtual_driver/posix/mac_packaging/install.sh |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..bc72247b6653956b42f772bd5185781864990e1f |
| --- /dev/null |
| +++ b/cloud_print/virtual_driver/posix/mac_packaging/install.sh |
| @@ -0,0 +1,24 @@ |
| +#!/bin/bash |
|
Mark Mentovai
2011/08/19 23:52:20
What user does this script run as? root, right? Th
|
| + |
|
Mark Mentovai
2011/08/19 23:52:20
Boilerplate license. See chrome/installer/mac/keys
|
| +# Change working directory to the one in which the script is located. |
|
Mark Mentovai
2011/08/19 23:52:20
All shell scripts should run with set -e (unless p
|
| +DIR="$( cd "$( dirname "$0" )" && pwd )" |
| +cd $DIR |
|
Mark Mentovai
2011/08/19 23:52:20
These two lines are silly. Just do:
cd "$(dirname
|
| + |
| +# Change the ownership and permissions, as Package Maker can be buggy |
| +chown root:wheel /usr/libexec/cups/backend/GCP-driver |
| +chmod 0700 /usr/libexec/cups/backend/GCP-driver |
|
Mark Mentovai
2011/08/19 23:52:20
Why 0700?
abeera_chromium.org
2011/08/20 02:37:13
We need the permissions to be set this way, so tha
|
| + |
| +# Restart cups so that it sees the new backend |
| +launchctl stop org.cups.cupsd |
| +launchctl start org.cups.cupsd |
| + |
| +# Install the Cloud Print Driver only for the current user, |
| +# since the Service Process is available only for current user |
| +# Give it a unique name, so that multiple users |
| +# on the same machine can install GCP. |
| +# $USER contains the username of the person that started the install. |
| +lpadmin -p Google-Cloud-Print-$USER -E -P GCP-driver.ppd -D \ |
|
Mark Mentovai
2011/08/19 23:52:20
Use ${USER} form and always "quote" shell argument
Mark Mentovai
2011/08/19 23:52:20
This only creates it for one user. How will other
abeera_chromium.org
2011/08/20 02:37:13
We only want to install per user, since GCP-instal
|
| + "Google Cloud Print" -u allow:$USER -o printer-is-shared=false -v GCP-driver:/ |
| + |
| +# Register the driver with Chrome/Chromium using the included ObjC program. |
| +./GCP-install |
|
Mark Mentovai
2011/08/19 23:52:20
I would prefer to see
"$(pwd)/GCP-install"
so th
abeera_chromium.org
2011/08/20 02:37:13
Its a file that I wrote, part of the Chromium proj
|