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

Unified Diff: src/scripts/common.sh

Issue 1515011: Adds gmergefs. A method of remoting to a target and pushing new (Closed)
Patch Set: Fixes for adlr Created 10 years, 9 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
« no previous file with comments | « src/scripts/build_image ('k') | src/scripts/enter_chroot.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/common.sh
diff --git a/src/scripts/common.sh b/src/scripts/common.sh
index e276215ae0aff1dab9992dd6af69193e24cad4c5..f75fa6b1301dc994d0eab7faa268ea1d3e8348f1 100644
--- a/src/scripts/common.sh
+++ b/src/scripts/common.sh
@@ -116,6 +116,13 @@ fi
# Directory locations inside the dev chroot
CHROOT_TRUNK_DIR="/home/$USER/trunk"
+# Install make for portage ebuilds. Used by build_image and gmergefs.
+DEFAULT_INSTALL_MASK="/usr/include/ /usr/man /usr/share/man /usr/share/doc \
+ /usr/share/gtk-doc /usr/share/gtk-2.0 /usr/lib/gtk-2.0/include \
+ /usr/share/info /usr/share/aclocal /usr/lib/gcc /usr/lib/pkgconfig \
+ /usr/share/pkgconfig /usr/share/gettext /usr/share/readline /etc/runlevels \
+ /usr/share/openrc /lib/rc *.a *.la"
+
# Check to ensure not running old scripts
V_REVERSE=''
V_VIDOFF=''
@@ -295,3 +302,24 @@ function die {
error "$1"
exit 1
}
+
+# Retry an emerge command according to $FLAGS_retries
+# The $EMERGE_JOBS flags will only be added the first time the command is run
+function eretry () {
+ $* $EMERGE_JOBS && return 0
+ local i=
+ for i in $(seq $FLAGS_retries); do
+ echo Retrying $*
+ $* && return 0
+ done
+ return 1
+}
+
+# Removes single quotes around parameter
+# Arguments:
+# $1 - string which optionally has surrounding quotes
+# Returns:
+# None, but prints the string without quotes.
+function remove_quotes() {
+ echo "$1" | sed -e "s/^'//; s/'$//"
+}
« no previous file with comments | « src/scripts/build_image ('k') | src/scripts/enter_chroot.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698