VirtualBox

source: kBuild/vendor/gnumake/current/tests/mkshadow@ 3138

Last change on this file since 3138 was 3138, checked in by bird, 7 years ago

Imported make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6) from https://git.savannah.gnu.org/git/make.git.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
File size: 1.4 KB
Line 
1#!/bin/sh
2#
3# Simple script to make a "shadow" test directory, using symbolic links.
4# Typically you'd put the shadow in /tmp or another local disk
5#
6# Copyright (C) 1992-2016 Free Software Foundation, Inc.
7# This file is part of GNU Make.
8#
9# GNU Make is free software; you can redistribute it and/or modify it under
10# the terms of the GNU General Public License as published by the Free Software
11# Foundation; either version 3 of the License, or (at your option) any later
12# version.
13#
14# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
15# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17# details.
18#
19# You should have received a copy of the GNU General Public License along with
20# this program. If not, see <http://www.gnu.org/licenses/>.
21
22case "$1" in
23 "") echo 'Usage: mkshadow <destdir>'; exit 1 ;;
24esac
25
26dest="$1"
27
28if [ ! -d "$dest" ]; then
29 echo "Destination directory '$dest' must exist!"
30 exit 1
31fi
32
33if [ ! -f run_make_tests ]; then
34 echo "The current directory doesn't appear to contain the test suite!"
35 exit 1
36fi
37
38suite=`pwd | sed 's%^/tmp_mnt%%'`
39name=`basename "$suite"`
40
41files=`echo *`
42
43set -e
44
45mkdir "$dest/$name"
46cd "$dest/$name"
47
48ln -s "$suite" .testdir
49
50for f in $files; do
51 ln -s .testdir/$f .
52done
53
54rm -rf work
55
56echo "Shadow test suite created in '$dest/$name'."
57exit 0
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette