Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5429)

Unified Diff: chrome/installer/mac/app/copy_to_disk.sh

Issue 2293923005: General comment cleaning / refactoring for Mac Installer (Closed)
Patch Set: Ivan fixes Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
index 89c881ca34eb2558674ba0815e7e2794d374724e..b56aa0c278ee9c59257698d84d83d8efaf64a1a0 100755
--- a/chrome/installer/mac/app/copy_to_disk.sh
+++ b/chrome/installer/mac/app/copy_to_disk.sh
@@ -12,9 +12,9 @@
# used on the first line to prevent bash from setting the effective user ID to
# the real user ID (dropping root privileges).
-# The 'e' flag causes the script to terminate if it comes across an error while
-# running. The 'u' flag will raise an error if a variable isn't set.
-# 'u pipefail' will set the return exit code to the last non-zero error code.
+# 'e': terminate if error arises
+# 'u': raise an error if a variable isn't set
+# 'o pipefail': set the return exit code to the last non-zero error code
set -euo pipefail
# Waits for the main app to pass the path to the app bundle inside the mounted
@@ -26,9 +26,11 @@ APPBUNDLENAME=$(basename "${SRC}")
FULL_DEST="${DEST}"/"${APPBUNDLENAME}"
# Starts the copy
-# The 'l' flag tells rsync to copy symlinks as symlinks. 'r' is for recursive,
-# so copy all files, 'p' is to preserve permisisons. 't' is to preserve times.
-# 'q' is for quiet mode so rynsc will only log to console if an error occurs.
+# 'l': copy symlinks as symlinks
+# 'r': recursive copy
+# 'p': preserve permissions
+# 't': preserve times
+# 'q': quiet mode, so rynsc will only log to console if an error occurs
Sidney San Martín 2016/08/31 21:20:16 I really like these comments which describe each f
rsync -lrptq "${SRC}" "${DEST}"
# If this script is run as root, change ownership to root and set elevated

Powered by Google App Engine
This is Rietveld 408576698