Index: doc/shar.1 =================================================================== RCS file: /cvsroot/sharutils/sharutils/doc/shar.1,v retrieving revision 1.3 diff -b -B -u -p -r1.3 shar.1 --- doc/shar.1 1 Jul 2005 13:44:51 -0000 1.3 +++ doc/shar.1 30 Jul 2005 17:08:20 -0000 @@ -48,7 +48,9 @@ switch is especially useful when the com the list of files to be packed. For example: .nf -find . \-type f \-print | sort | shar \-S \-Z \-L50 \-o /tmp/big +find . \-type f \-print | \\ + sort | \\ + shar \-S \-Z \-L50 \-o /somewhere/big .fi If \f2\-p\f1 is specified on the command line, then the options Index: doc/sharutils.texi =================================================================== RCS file: /cvsroot/sharutils/sharutils/doc/sharutils.texi,v retrieving revision 1.7 diff -b -B -u -p -r1.7 sharutils.texi --- doc/sharutils.texi 23 Jan 2005 18:49:46 -0000 1.7 +++ doc/sharutils.texi 30 Jul 2005 17:08:20 -0000 @@ -279,7 +279,8 @@ This switch is especially useful when th the list of files to be packed. For example: @example -find . -type f -print | shar -S -o /tmp/big.shar +find . -type f -print | \ + shar -S -o /somewhere/big.shar @end example If @code{-p} is specified on the command line, then the options Index: src/remsync.in =================================================================== RCS file: /cvsroot/sharutils/sharutils/src/remsync.in,v retrieving revision 1.2 diff -b -B -u -p -r1.2 remsync.in --- src/remsync.in 7 Jun 2005 21:54:04 -0000 1.2 +++ src/remsync.in 30 Jul 2005 17:08:21 -0000 @@ -3,6 +3,8 @@ eval "exec @PERL@ -S $0 $*" if $running_under_some_shell; +use File::Temp qw/ :mktemp /; + # Synchronization tool for remote directories. # Copyright (C) 1994 Free Software Foundation, Inc. # François Pinard , 1994. @@ -1785,8 +1787,10 @@ sub maybe_study_files } } + $findtempfile = mktemp( "./remsync.XXXXXX" ); + open (SCAN, - "find$list -type f 2> /tmp/$$.find | xargs -r $checksum_command |") + "find$list -type f 2> $findtempfile | xargs -r $checksum_command |") || &interrupt ('Cannot launch program `find\''); # Process each existing file in turn. @@ -1815,9 +1819,9 @@ sub maybe_study_files } close SCAN; - # Clean out scanning for inexisting files. + # Clean out scanning for non-existing files. - open (SCAN, "/tmp/$$.find"); + open (SCAN, $findtempfile); while () { chop; @@ -1843,7 +1847,7 @@ To get rid of this warning, delete the s } } close SCAN; - unlink "/tmp/$$.find"; + unlink $findtempfile; $study_files = 0; }