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 9214 aaronmk
	cmd_log_fd=1 try self "$@"
12 9015 aaronmk
	ignore 12 # "zip has nothing to do" (`man zip`)
13
	end_try
14
}
15
16 9215 aaronmk
unzip() { echo_func; cmd_log_fd=1 self "$@"; }
17 9015 aaronmk
18
set_inv force
19
alias zip_newer='zip ${no_force:+-u }'
20
alias unzip_newer='unzip ${no_force:+-u }-o'
21
	# -o is safe because -u only extracts newer files
22
23
fi