From 1d107dc1f7050a80d53f8e094e61407ba631570d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 24 Oct 2012 17:39:38 -0400 Subject: [PATCH] setup_board: load all hooks in one go No need to setup these hooks in their own set of sudo commands, so merge with the existing block to avoid another sudo. Also install all hooks that are available in case we want to add more in the future (we probably do). BUG=None TEST=`./setup_board --board=daisy --skip_chroot_upgrade --regen_configs` created install hooks Change-Id: Idcd64afc32c81fcc2b4a712992c5ee0edf5ae0d4 Reviewed-on: https://gerrit.chromium.org/gerrit/36474 Reviewed-by: Brian Harring Tested-by: Mike Frysinger Commit-Ready: Mike Frysinger --- setup_board | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/setup_board b/setup_board index c3e9db6e89..37f85d72f3 100755 --- a/setup_board +++ b/setup_board @@ -531,15 +531,13 @@ cmds=( "touch /etc/make.conf.user" "ln -sf /etc/make.globals '${BOARD_ROOT}/etc/make.globals'" "ln -sf /etc/make.conf.user '${BOARD_ROOT}/etc/make.conf.user'" + "mkdir -p '${BOARD_ROOT}/etc/portage/hooks'" ) +for d in "${SCRIPTS_DIR}"/hooks/*; do + cmds+=( "ln -sfT '${d}' '${BOARD_ROOT}/etc/portage/hooks/${d##*/}'" ) +done sudo_multi "${cmds[@]}" -# Set up post_install hooks that run qa on ELF binaries. -sudo_multi \ - "mkdir -p '${BOARD_ROOT}/etc/portage/hooks'" \ - "ln -sfT '${SCRIPTS_DIR}/hooks/install' \ - '${BOARD_ROOT}/etc/portage/hooks/install'" - # Select the profile to build based on the board and profile passed to # setup_board. The developer can later change profiles by running # cros_choose_profile manually.