summaryrefslogtreecommitdiffstats
path: root/LICENSE
diff options
context:
space:
mode:
authorTrevor Bramwell <tbramwell@linuxfoundation.org>2021-06-29 13:10:25 +0000
committerGerrit Code Review <gerrit@opnfv.org>2021-06-29 13:10:25 +0000
commit281fa6024f7f9182baa194b561d5a26a9aef817a (patch)
treeda208a604ce8f87d29603448c13d6f88db7f576c /LICENSE
parent08358993fcab1ba47dcd2d24a4f99915e6725fcc (diff)
parent47e4c2a7712b757a776124965d7ecbaa0bf03fbb (diff)
Merge "Create Kali stable branch for Kuberef"
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions
lor: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/bin/bash -e
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2016 NEC and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
function isinstalled {

source /etc/os-release; echo ${ID/*, /}

if [[ ${ID/*, /} =~ "centos" ]]; then
  if rpm -q "$@" >/dev/null 2>&1; then
    true
      else
        echo installing "$1"
        sudo yum install "$1"
    false
  fi

elif [[ ${ID/*, /} =~ "ubuntu" ]]; then
  if dpkg-query -W -f'${Status}' "$@" 2>/dev/null | grep -q "ok installed"; then
    true
      else
        echo installing "$1"
        sudo apt-get install -y "$1"
    false
  fi
else
  echo "Distro not supported"
  exit 0
fi

}

if ! isinstalled gnupg2; then
  echo "error with install"
  exit 0
fi

if ! which gsutil;
  then echo "error gsutil not installed";
  exit 0
fi

if gpg2 --list-keys | grep "opnfv-helpdesk@rt.linuxfoundation.org"; then
  echo "Key Already available"
else
  if [ -z "$NODE_NAME" ];
    then echo "Cannot find node name"
      exit 0
    else echo "Importing key for '$NODE_NAME'";
     gsutil cp gs://opnfv-signing-keys/"$NODE_NAME"-subkey .
     gpg2 --import "$NODE_NAME"-subkey
     rm -f "$NODE_NAME"-subkey
   fi
fi