Index: chrome/installer/mac/app/copy_to_disk.sh |
diff --git a/chrome/installer/mac/app/copy_to_disk.sh b/chrome/installer/mac/app/copy_to_disk.sh |
new file mode 100755 |
index 0000000000000000000000000000000000000000..152666eb69dbb330ad969d32fac3ada17a82bbb6 |
--- /dev/null |
+++ b/chrome/installer/mac/app/copy_to_disk.sh |
@@ -0,0 +1,26 @@ |
+#!/bin/sh -pe |
+ |
+# Copyright 2016 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+# This script will be called by the main application to copy the chrome app |
+# into the /Applciations folder. This script assumes it is running as root and |
+# will only be called if the program obtains root permissions. |
+# |
+# When running as root, this script will be invoked with the real user ID set |
+# to the user's ID, but the effective user ID set to 0 (root). bash -p is |
+# used on the first line to prevent bash from setting the effective user ID to |
+# the real user ID (dropping root privileges). |
+ |
+# Lets this program start but hang until parent process gives it input |
+# as a flag to continue. |
+read -n 1 |
ivanhernandez
2016/08/16 17:18:39
We want to authenticate as soon as the program lau
Anna Zeng
2016/08/18 15:57:16
Minor correction: "... but we don't want this scri
ivanhernandez
2016/08/22 15:34:49
Hmm seems like 'wait' would need for another proce
|
+ |
+SRC=${1} |
+DEST=${2} |
+FULL_DEST=${3} |
+ |
+rsync -lrpt "${SRC}" "${DEST}" >& /dev/null |
+chown -Rh root:admin "${FULL_DEST}" >& /dev/null |
+chmod -R a+rX,ug+w,o-w "${FULL_DEST}" >& /dev/null |