0001
0002
0003
0004
0005
0006
0007
0008
0009 main()
0010 {
0011 base_dir=`pwd`
0012 install_dir="$base_dir"/kselftest_install
0013
0014
0015 if [ $(basename "$base_dir") != "selftests" ]; then
0016 echo "$0: Please run it in selftests directory ..."
0017 exit 1;
0018 fi
0019
0020
0021 if [ "$#" -eq 0 ]; then
0022 echo "$0: Installing in default location - $install_dir ..."
0023 elif [ ! -d "$1" ]; then
0024 echo "$0: $1 doesn't exist!!"
0025 exit 1;
0026 else
0027 install_dir="$1"
0028 echo "$0: Installing in specified location - $install_dir ..."
0029 fi
0030
0031
0032 KSFT_INSTALL_PATH="$install_dir" make install
0033 }
0034
0035 main "$@"