1 unpackCmdHooks
+=(_FreeBSDUnpackSource
)
3 _FreeBSDUnpackSource
() {
9 destination
="$(stripHash "$fn")"
11 if [ -e "$destination" ]; then
12 echo "Cannot copy $fn to $destination: destination already exists!"
13 echo "Did you specify two \"srcs\" with the same \"name\"?"
17 # We can't preserve hardlinks because they may have been
18 # introduced by store optimization, which might break things
20 bsdcp
-a -- "$fn" "$destination"
21 chmod -R +w
"$destination"
26 *.
tar.xz |
*.
tar.lzma |
*.txz
)
27 # Don't rely on tar knowing about .xz.
28 xz
-d < "$fn" |
tar xf
- --warning=no-timestamp
30 *.
tar |
*.
tar.
* |
*.tgz |
*.tbz2 |
*.tbz
)
31 # GNU tar can automatically select the decompression method
32 # (info "(tar) gzip").
33 tar xf
"$fn" --warning=no-timestamp