diff options
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/cpt-export | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/cpt-export b/contrib/cpt-export index 9b4edd1..87ba2da 100755 --- a/contrib/cpt-export +++ b/contrib/cpt-export @@ -25,8 +25,10 @@ while read -r file; do done < "$CPT_ROOT/var/db/cpt/installed/$pkg/manifest" # Turn the list of files back into a package. -: "${CPT_COMPRESS:=gz}" -tar cf - -C / -- "$@" | case "$CPT_COMPRESS" in +(cd "$CPT_ROOT/" + tar cf - -- "$@" || exit 1) | + +case "$CPT_COMPRESS" in bz2) bzip2 -z ;; gz) gzip -6 ;; xz) xz -zT 0 ;; |