2 # Copyright (c) 2016 Cisco and/or its affiliates.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at:
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
18 # perform some very rudimentary platform detection
20 if command_exists lsb_release; then
21 lsb_dist="$(lsb_release -si)"
23 if [ -z "$lsb_dist" ] && [ -r /etc/lsb-release ]; then
24 lsb_dist="$(. /etc/lsb-release && echo "$DISTRIB_ID")"
26 if [ -z "$lsb_dist" ] && [ -r /etc/fedora-release ]; then
29 if [ -z "$lsb_dist" ] && [ -r /etc/centos-release ]; then
32 if [ -z "$lsb_dist" ] && [ -r /etc/os-release ]; then
33 lsb_dist="$(. /etc/os-release && echo "$ID")"
36 lsb_dist="$(echo "$lsb_dist" | tr '[:upper:]' '[:lower:]')"
38 fedora|centos|ubuntu|debian)
41 echo "Operating system [$lsb_dist] is unsupported"
57 echo "$LSB is not supported"
62 sudo -H pip uninstall vpp-config
71 sudo rm -r vpp_config.egg-info
72 sudo rm -r $ROOTDIR/vpp/vpp-config
73 sudo rm $ROOTDIR/bin/vpp-config