github.com/jingruilea/kubeedge@v1.2.0-beta.0.0.20200410162146-4bb8902b3879/tests/e2e/scripts/bluetoothconfig.sh (about) 1 #!/usr/bin/env bash 2 # Copyright 2019 The KubeEdge Authors. 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 16 dockerhubusername=$1 17 nodename=$2 18 19 SRC_DIR=${GOPATH}/src/github.com/kubeedge/kubeedge 20 BLUETOOTH_PATH=${SRC_DIR}/mappers/bluetooth_mapper/deployment.yaml 21 22 create_bluetooth_config() { 23 if [ ! -f ${BLUETOOTH_PATH} ]; then 24 echo "There is no deployment.yaml!" 25 exit 1 26 fi 27 echo "file found !!!!!!!!!!!!!" 28 sed -i "s|image: .*|image: ${dockerhubusername}/bluetooth_mapper:v1.0|g" ${BLUETOOTH_PATH} 29 sed -i "30s|name: .*|name: device-profile-config-${nodename}|g" ${BLUETOOTH_PATH} 30 } 31 32 create_bluetooth_config