| Last change
 on this file since 154 was             53, checked in by bird, 22 years ago | 
        
          | 
Initial revision
 | 
        
          | 
              
Property                 svn:eol-style
 set to                 native | 
        
          | File size:
            708 bytes | 
      
      
| 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 |  | 
|---|
| 7 | case "$1" in | 
|---|
| 8 | "") echo 'Usage: mkshadow <destdir>'; exit 1 ;; | 
|---|
| 9 | esac | 
|---|
| 10 |  | 
|---|
| 11 | dest="$1" | 
|---|
| 12 |  | 
|---|
| 13 | if [ ! -d "$dest" ]; then | 
|---|
| 14 | echo "Destination directory \`$dest' must exist!" | 
|---|
| 15 | exit 1 | 
|---|
| 16 | fi | 
|---|
| 17 |  | 
|---|
| 18 | if [ ! -f run_make_tests ]; then | 
|---|
| 19 | echo "The current directory doesn't appear to contain the test suite!" | 
|---|
| 20 | exit 1 | 
|---|
| 21 | fi | 
|---|
| 22 |  | 
|---|
| 23 | suite=`pwd | sed 's%^/tmp_mnt%%'` | 
|---|
| 24 | name=`basename "$suite"` | 
|---|
| 25 |  | 
|---|
| 26 | files=`echo *` | 
|---|
| 27 |  | 
|---|
| 28 | set -e | 
|---|
| 29 |  | 
|---|
| 30 | mkdir "$dest/$name" | 
|---|
| 31 | cd "$dest/$name" | 
|---|
| 32 |  | 
|---|
| 33 | ln -s "$suite" .testdir | 
|---|
| 34 |  | 
|---|
| 35 | for f in $files; do | 
|---|
| 36 | ln -s .testdir/$f . | 
|---|
| 37 | done | 
|---|
| 38 |  | 
|---|
| 39 | rm -rf work | 
|---|
| 40 |  | 
|---|
| 41 | echo "Shadow test suite created in \`$dest/$name'." | 
|---|
| 42 | exit 0 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.