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