4
0

delete03.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #! /bin/sh
  2. # Copyright (C) 2001 Free Software Foundation, Inc.
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  17. # 02111-1307, USA.
  18. . ./preset
  19. TAR_ARCHIVE_FORMATS="gnu oldgnu posix"
  20. . $srcdir/before
  21. set -e
  22. prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
  23. rm -f $prefix*
  24. for i in 1 2 3 4 5 6 7 8 9
  25. do touch $prefix$i
  26. done
  27. tar -cf archive ./$prefix*
  28. tar --delete -f archive ./${prefix}5
  29. tar -tf archive
  30. out="\
  31. ./${prefix}1
  32. ./${prefix}2
  33. ./${prefix}3
  34. ./${prefix}4
  35. ./${prefix}6
  36. ./${prefix}7
  37. ./${prefix}8
  38. ./${prefix}9
  39. "
  40. . $srcdir/after