Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | |
| 4 | |
| 5 | rm -rf testdir |
| 6 | ./busybox cp tar.c testdir |
| 7 | |
| 8 | if ! eval diff -u tar.c testdir ; then |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 9 | echo "Bummer. File copy failed." |
| 10 | exit 0 |
| 11 | else |
| 12 | echo "Cool. File copy is ok." |
| 13 | fi |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 14 | |
| 15 | rm -rf testdir |
| 16 | mkdir -p testdir/foo |
| 17 | ./busybox cp tar.c testdir/foo |
| 18 | |
| 19 | if ! eval diff -u tar.c testdir/foo/tar.c ; then |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 20 | echo "Bummer. File copy to a directory failed." |
| 21 | exit 0 |
| 22 | else |
| 23 | echo "Cool. File copy to a directory is ok." |
| 24 | fi |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 25 | |
| 26 | |
| 27 | rm -rf testdir |
| 28 | mkdir -p testdir/foo |
| 29 | ./busybox cp tar.c testdir/foo/ |
| 30 | |
| 31 | if ! eval diff -u tar.c testdir/foo/tar.c ; then |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 32 | echo "Bummer. File copy to a directory w/ a '/' failed." |
| 33 | exit 0 |
| 34 | else |
| 35 | echo "Cool. File copy to a directory w/ a '/' is ok." |
| 36 | fi |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 37 | |
| 38 | |
| 39 | rm -rf testdir X11 |
| 40 | cp -a /etc/X11 . |
| 41 | ./busybox cp -a X11 testdir |
| 42 | |
| 43 | if ! eval diff -ur X11 testdir ; then |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 44 | echo "Bummer. Local dir copy failed." |
| 45 | exit 0 |
| 46 | else |
| 47 | echo "Cool. Local dir copy is ok." |
| 48 | fi |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 49 | |
| 50 | rm -rf testdir X11 |
| 51 | cp -a /etc/X11 . |
| 52 | ./busybox cp -a X11 testdir/ |
| 53 | |
| 54 | if ! eval diff -ur X11 testdir ; then |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 55 | echo "Bummer. Local dir copy w/ a '/' failed." |
| 56 | exit 0 |
| 57 | else |
| 58 | echo "Cool. Local dir copy w/ a '/' is ok." |
| 59 | fi |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 60 | |
| 61 | rm -rf testdir X11 |
| 62 | cp -a /etc/X11 . |
| 63 | ./busybox cp -a X11/ testdir |
| 64 | |
| 65 | if ! eval diff -ur X11 testdir ; then |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 66 | echo "Bummer. Local dir copy w/ a src '/' failed." |
| 67 | exit 0 |
| 68 | else |
| 69 | echo "Cool. Local dir copy w/ a src '/' is ok." |
| 70 | fi |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 71 | |
| 72 | rm -rf testdir X11 |
| 73 | cp -a /etc/X11 . |
| 74 | ./busybox cp -a X11/ testdir/ |
| 75 | |
| 76 | if ! eval diff -ur X11 testdir ; then |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 77 | echo "Bummer. Local dir copy w/ 2x '/'s failed." |
| 78 | exit 0 |
| 79 | else |
| 80 | echo "Cool. Local dir copy w/ 2x '/'s is ok." |
| 81 | fi |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 82 | |
| 83 | rm -rf testdir X11 |
| 84 | ./busybox cp -a /etc/X11 testdir |
| 85 | if ! eval diff -ur /etc/X11 testdir ; then |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 86 | echo "Bummer. Remote dir copy failed." |
| 87 | exit 0 |
| 88 | else |
| 89 | echo "Cool. Remote dir copy is ok." |
| 90 | fi |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 91 | |
| 92 | |
| 93 | rm -rf testdir X11 |
| 94 | mkdir -p testdir/foo |
| 95 | |
| 96 | ./busybox cp -a /etc/X11 testdir/foo |
| 97 | if ! eval diff -ur /etc/X11 testdir/foo ; then |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 98 | echo "Bummer. Remote dir copy to a directory failed." |
| 99 | exit 0 |
| 100 | else |
| 101 | echo "Cool. Remote dir copy to a directory is ok." |
| 102 | fi |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 103 | |
| 104 | |
| 105 | rm -rf testdir X11 |
| 106 | mkdir -p testdir/foo |
| 107 | |
| 108 | ./busybox cp -a /etc/X11 testdir/foo/ |
| 109 | if ! eval diff -ur /etc/X11 testdir/foo ; then |
Erik Andersen | a899108 | 1999-12-29 03:34:00 +0000 | [diff] [blame] | 110 | echo "Bummer. Remote dir copy to a directory w/ a '/' failed." |
| 111 | exit 0 |
| 112 | else |
| 113 | echo "Cool. Remote dir copy to a directory w/ a '/' is ok." |
| 114 | fi |
| 115 | |
| 116 | rm -rf testdir |
| 117 | |
Erik Andersen | 96e2abd | 2000-01-07 11:40:44 +0000 | [diff] [blame] | 118 | |
| 119 | rm -rf foo bar |
| 120 | mkdir foo |
| 121 | mkdir bar |
| 122 | |
| 123 | if ! eval ./busybox cp README foo ; then |
| 124 | echo "Bummer. cp README foo failed." |
| 125 | exit 0 |
| 126 | else |
| 127 | echo "Cool. cp README foo is ok." |
| 128 | fi |
| 129 | |
| 130 | if ! eval ./busybox cp foo/README bar ; then |
| 131 | echo "Bummer. cp foo/README bar failed." |
| 132 | exit 0 |
| 133 | else |
| 134 | echo "Cool. cp foo/README bar is ok." |
| 135 | fi |
| 136 | |
| 137 | rm -rf foo bar |
| 138 | |