Lines Matching refs:file

63 	[l:whole-size-limit]#[size?Limit the output file size to \asize\a
80 [t:tty?Write errors and the name of each file to \b/dev/tty\b as it is
82 [w:no-character-count?Do NOT check each file with \bwc -c\b after
89 [L:split-size-limit]#[size?Limit the output file size to \asize\a
97 [S:stdin-file-list?Read list of files to be packed from the standard
127 exists=$"'(file already exists)'"
130 uncomp=$"uncompressing file"
165 typeset file=$1
166 if [[ $flags == *p* && $file == -[zBTZ] ]]
167 then mode=${file#-}
168 elif [[ -f $file ]]
170 then contents="$contents$IFS${file##*/}"
171 else contents="$contents$IFS$file"
173 elif [[ -d $file ]]
175 then err_exit "cannot archive directory $file with -b option."
177 contdirs="$contdirs$IFS$file/ "
179 else err_exit "cannot archive $file"
184 then while read -r file
185 do preprocess_files "$file"
186 print -r -- "$file"
188 else for file
189 do preprocess_files "$file"
218 # it in a file and typing "sh file".
279 function isbinary #file
281 [[ $(file -m /dev/null -M "$1") == @(*/ebcdic*|*/octet-stream|*system*/*) ]]
284 function emit_guard # file type
301 function makedirs # file
303 typeset file=$1
304 file=$(dirname "$file")
305 if [[ $file == @(.|/|//) ]]
308 makedirs "$file"
310 if test ! -d '$file'
311 then test X"\$quiet" != X && echo 'x -' '$mkdir' '$file'
312 mkdir '$file'
320 typeset file=$1
322 if [[ -d $file ]]
328 M) if isbinary "$file"
336 then name=${file##*/}
337 [[ $flags != *q* ]] && logmsg "a - $name [from $file] ($filetype)"
338 else name="$file"
339 [[ $flags != *q* ]] && logmsg "a - $file ($filetype)"
342 print -r "# ============= $file =============="
343 if [[ $file == */* ]]
344 then makedirs "$file"
346 # Emit either a mkdir or a cat/sed to extract the file.
347 if [[ -d $file ]]
348 then print "mkdir $file"
349 [[ flags != *Q* ]] && print "echo mkdir -- $file"
352 printf "if\ttest -f %q && test \"X\$nocheck\" != X-c\nthen\t" "$file"
356 printf "\$quiet || $skipping %q $exists\nelse \$quiet || $extract %q '(%s)'\n" "$file" "$file" "$filetype"
359 then compress $arg < $file > /tmp/shar$$.2
363 then gzip $arg < $file > /tmp/shar$$.2
366 else dname=$file
373 then printf "echo '$uncomp' %s\n\$uncompress %q\n" "$file" "$cname"
375 then printf "echo '$uncomp' %s\ngunzip %q\n" "$file" "$cname"
378 sed -e 's/^[.~@]/@&/' -e 's/^From/@&/' "$file"
383 # Emit chmod to set permissions on the extracted file;
385 fmode=$(ls -df "%(mode)s" "$file")
387 mtime=$(date -m -f %# "$file")
393 then while read -r file
394 do pack_file "$file"
396 else for file
397 do pack_file "$file"