Project

General

Profile

« Previous | Next » 

Revision 9015

lib/sh/util.sh: split archive (zip) utils out into separate archives.sh

View differences:

util.sh
293 293
	)|echo_stdin) "$@"
294 294
}
295 295

  
296
#### compression
297

  
298
### zip
299

  
300
zip ()
301
{
302
	stdout2stderr=1 try limit_stderr_cmd self "$@"
303
	ignore 12 # "zip has nothing to do" (`man zip`)
304
	end_try
305
}
306

  
307
unzip () { stdout2stderr=1 limit_stderr_cmd self "$@"; }
308

  
309
set_inv force
310
alias zip_newer='zip ${no_force:+-u }'
311
alias unzip_newer='unzip ${no_force:+-u }-o'
312
	# -o is safe because -u only extracts newer files
313

  
314 296
#### URLs
315 297

  
316 298
localize_url () { test _"$1" = _"$(hostname -f)" || echo "$1"; }

Also available in: Unified diff