Project

General

Profile

1 9015 aaronmk
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/util.sh
3
4
if self_not_included; then
5
6
### zip
7
8 9074 aaronmk
zip()
9 9015 aaronmk
{
10 9215 aaronmk
	echo_func
11 9537 aaronmk
	cmd_log_fd=1 try self "$@" || ignore 12 #"zip has nothing to do" (`man zip`)
12 9015 aaronmk
}
13
14 9215 aaronmk
unzip() { echo_func; cmd_log_fd=1 self "$@"; }
15 9015 aaronmk
16 9249 aaronmk
zip_newer()   { echo_func; set_inv force; zip   ${no_force:+-u }"$@"; }
17
unzip_newer() { echo_func; set_inv force; unzip ${no_force:+-u }-o "$@"; }
18 9015 aaronmk
	# -o is safe because -u only extracts newer files
19
20
fi