same-order01.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #! /bin/sh
  2. # -C dir did not work with --same-order
  3. # Bug reported by Karl-Michael Schneider <schneide@phil.uni-passau.de>
  4. # This file is part of GNU tar testsuite.
  5. # Copyright (C) 2004 Free Software Foundation, Inc.
  6. #
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2, or (at your option)
  10. # any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, write to the Free Software
  19. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  20. # 02111-1307, USA.
  21. . ./preset
  22. . $srcdir/before
  23. set -e
  24. genfile -l 1024 > file1
  25. genfile -l 1024 > file2
  26. tar cf archive file1 file2
  27. mkdir directory
  28. tar -xf archive --same-order -C directory
  29. ls directory
  30. out="\
  31. file1
  32. file2
  33. "
  34. . $srcdir/after