VirtualBox

source: kBuild/trunk/src/kmk/tests/mkshadow@ 2016

Last change on this file since 2016 was 1993, checked in by bird, 16 years ago

Merged in current GNU Make code (CVS from 2008-10-28). Ref #55.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
File size: 1.5 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, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
7# 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
8# This file is part of GNU Make.
9#
10# GNU Make is free software; you can redistribute it and/or modify it under
11# the terms of the GNU General Public License as published by the Free Software
12# Foundation; either version 3 of the License, or (at your option) any later
13# version.
14#
15# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
16# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18# details.
19#
20# You should have received a copy of the GNU General Public License along with
21# this program. If not, see <http://www.gnu.org/licenses/>.
22
23case "$1" in
24 "") echo 'Usage: mkshadow <destdir>'; exit 1 ;;
25esac
26
27dest="$1"
28
29if [ ! -d "$dest" ]; then
30 echo "Destination directory \`$dest' must exist!"
31 exit 1
32fi
33
34if [ ! -f run_make_tests ]; then
35 echo "The current directory doesn't appear to contain the test suite!"
36 exit 1
37fi
38
39suite=`pwd | sed 's%^/tmp_mnt%%'`
40name=`basename "$suite"`
41
42files=`echo *`
43
44set -e
45
46mkdir "$dest/$name"
47cd "$dest/$name"
48
49ln -s "$suite" .testdir
50
51for f in $files; do
52 ln -s .testdir/$f .
53done
54
55rm -rf work
56
57echo "Shadow test suite created in \`$dest/$name'."
58exit 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