Loading...
1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
3#
4# Kselftest Install
5# Install kselftest tests
6# Author: Shuah Khan <shuahkh@osg.samsung.com>
7# Copyright (C) 2015 Samsung Electronics Co., Ltd.
8
9main()
10{
11 base_dir=`pwd`
12 install_dir="$base_dir"/kselftest_install
13
14 # Make sure we're in the selftests top-level directory.
15 if [ $(basename "$base_dir") != "selftests" ]; then
16 echo "$0: Please run it in selftests directory ..."
17 exit 1;
18 fi
19
20 # Only allow installation into an existing location.
21 if [ "$#" -eq 0 ]; then
22 echo "$0: Installing in default location - $install_dir ..."
23 elif [ ! -d "$1" ]; then
24 echo "$0: $1 doesn't exist!!"
25 exit 1;
26 else
27 install_dir="$1"
28 echo "$0: Installing in specified location - $install_dir ..."
29 fi
30
31 # Build tests
32 KSFT_INSTALL_PATH="$install_dir" make install
33}
34
35main "$@"
1#!/bin/bash
2#
3# Kselftest Install
4# Install kselftest tests
5# Author: Shuah Khan <shuahkh@osg.samsung.com>
6# Copyright (C) 2015 Samsung Electronics Co., Ltd.
7
8# This software may be freely redistributed under the terms of the GNU
9# General Public License (GPLv2).
10
11install_loc=`pwd`
12
13main()
14{
15 if [ $(basename $install_loc) != "selftests" ]; then
16 echo "$0: Please run it in selftests directory ..."
17 exit 1;
18 fi
19 if [ "$#" -eq 0 ]; then
20 echo "$0: Installing in default location - $install_loc ..."
21 elif [ ! -d "$1" ]; then
22 echo "$0: $1 doesn't exist!!"
23 exit 1;
24 else
25 install_loc=$1
26 echo "$0: Installing in specified location - $install_loc ..."
27 fi
28
29 install_dir=$install_loc/kselftest
30
31# Create install directory
32 mkdir -p $install_dir
33# Build tests
34 INSTALL_PATH=$install_dir make install
35}
36
37main "$@"