brintos

brintos / linux-shallow public Read only

0
0
Text · 823 B · 407af7d Raw
36 lines · bash
1#!/bin/bash2# SPDX-License-Identifier: GPL-2.03#4# Kselftest Install5# Install kselftest tests6# 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_install13 14	# Make sure we're in the selftests top-level directory.15	if [ $(basename "$base_dir") !=  "selftests" ]; then16		echo "$0: Please run it in selftests directory ..."17		exit 1;18	fi19 20	# Only allow installation into an existing location.21	if [ "$#" -eq 0 ]; then22		echo "$0: Installing in default location - $install_dir ..."23	elif [ ! -d "$1" ]; then24		echo "$0: $1 doesn't exist!!"25		exit 1;26	else27		install_dir="$1"28		echo "$0: Installing in specified location - $install_dir ..."29	fi30 31	# Build tests32	KSFT_INSTALL_PATH="$install_dir" make install33}34 35main "$@"36