From acbd39160eaee3e5e34558402accaf7ad500656b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 1 Jun 2019 22:22:06 +0800 Subject: [PATCH] ceph-dashboard-pull-requests: only install google chrome on amd64 and remove the repo settings after done with installation Signed-off-by: Kefu Chai --- ceph-dashboard-pull-requests/setup/setup | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ceph-dashboard-pull-requests/setup/setup b/ceph-dashboard-pull-requests/setup/setup index b278a40c..c1635cae 100644 --- a/ceph-dashboard-pull-requests/setup/setup +++ b/ceph-dashboard-pull-requests/setup/setup @@ -1,23 +1,28 @@ #!/bin/bash set -ex +if [[ ! $(arch) =~ (i386|x86_64|amd64) ]]; then + # google chrome is only available on amd64 + exit +fi + if grep -q debian /etc/*-release; then sudo bash -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list' - wget https://dl.google.com/linux/linux_signing_key.pub - sudo apt-key add linux_signing_key.pub + curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - sudo apt-get update sudo apt-get install -y google-chrome-stable sudo apt-get install -y python-requests python-openssl python-jinja2 python-jwt - + sudo rm /etc/apt/sources.list.d/google-chrome.list elif grep -q rhel /etc/*-release; then sudo dd of=/etc/yum.repos.d/google-chrome.repo status=none <