mm: rename alloc_pages_exact_node() to __alloc_pages_node()
[linux/fpc-iii.git] / tools / testing / selftests / gen_kselftest_tar.sh
blob17d5bd0c0936415052725698e3beb1e3262d388e
1 #!/bin/bash
3 # gen_kselftest_tar
4 # Generate kselftest tarball
5 # Author: Shuah Khan <shuahkh@osg.samsung.com>
6 # Copyright (C) 2015 Samsung Electronics Co., Ltd.
8 # This software may be freely redistributed under the terms of the GNU
9 # General Public License (GPLv2).
11 # main
12 main()
14 if [ "$#" -eq 0 ]; then
15 echo "$0: Generating default compression gzip"
16 copts="cvzf"
17 ext=".tar.gz"
18 else
19 case "$1" in
20 tar)
21 copts="cvf"
22 ext=".tar"
24 targz)
25 copts="cvzf"
26 ext=".tar.gz"
28 tarbz2)
29 copts="cvjf"
30 ext=".tar.bz2"
32 tarxz)
33 copts="cvJf"
34 ext=".tar.xz"
37 echo "Unknown tarball format $1"
38 exit 1
40 esac
43 install_dir=./kselftest
45 # Run install using INSTALL_KSFT_PATH override to generate install
46 # directory
47 ./kselftest_install.sh
48 tar $copts kselftest${ext} $install_dir
49 echo "Kselftest archive kselftest${ext} created!"
51 # clean up install directory
52 rm -rf kselftest
55 main "$@"