Home | History | Annotate | Download | only in lisa
      1 #
      2 # SPDX-License-Identifier: Apache-2.0
      3 #
      4 # Copyright (C) 2015, ARM Limited and contributors.
      5 #
      6 # Licensed under the Apache License, Version 2.0 (the "License"); you may
      7 # not use this file except in compliance with the License.
      8 # You may obtain a copy of the License at
      9 #
     10 # http://www.apache.org/licenses/LICENSE-2.0
     11 #
     12 # Unless required by applicable law or agreed to in writing, software
     13 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
     14 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15 # See the License for the specific language governing permissions and
     16 # limitations under the License.
     17 #
     18 
     19 # LISA Shell: Initialization
     20 grep "bash" /proc/$$/cmdline &>/dev/null
     21 if [ $? -eq 0 ]; then
     22 	source ./src/shell/lisa_shell
     23 else
     24 	echo "WARNING: Current shell is not a BASH"
     25 	# Check if a bash shell is available
     26 	which bash &>/dev/null
     27 	if [ $? -eq 0 ]; then
     28 		# Switch to a BASH shell
     29 		exec bash --init-file ./init_env
     30 	else
     31 		echo "ERROR: A BASH shell is not available in PATH"
     32 	fi
     33 	# It's up to the user to install a BASH
     34 	echo "The LISA shell requires a BASH shell."
     35 	echo "Please, source this configuration from a terminal running BASH."
     36 fi
     37 
     38