.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "CDIST-TYPE__UNPACK" "7" "Sep 26, 2023" "7.0.0" "cdist" .SH NAME .sp cdist\-type__unpack \- Unpack archives .SH DESCRIPTION .sp Unpack \fB\&.tar\fP, \fB\&.tgz\fP, \fB\&.tar.*\fP, \fB\&.7z\fP, \fB\&.bz2\fP, \fB\&.gz\fP, \fB\&.lzma\fP, \fB\&.xz\fP, \fB\&.rar\fP and \fB\&.zip\fP archives. Archive type is detected by extension. .sp To achieve idempotency, checksum file will be created in target. See \fB\-\-sum\-file\fP parameter for details. .SH REQUIRED PARAMETERS .INDENT 0.0 .TP .B destination Depending on archive format file or directory to where archive contents will be written. .UNINDENT .SH OPTIONAL PARAMETERS .INDENT 0.0 .TP .B sum\-file Override archive\(aqs checksum file in target. By default \fBXXX.cdist__unpack_sum\fP will be used, where \fBXXX\fP is source archive path. This file must be kept in target\(aqs persistent storage. .TP .B tar\-strip Tarball specific. See \fBman tar\fP for \fB\-\-strip\-components\fP\&. .TP .B tar\-extra\-args Tarball sepcific. Append additional arguments to \fBtar\fP command. See \fBman tar\fP for possible arguments. .UNINDENT .SH OPTIONAL BOOLEAN PARAMETERS .INDENT 0.0 .TP .B backup\-destination By default destination file will be overwritten. In case destination is directory, files from archive will be added to or overwritten in directory. This parameter moves existing destination to \fBXXX.cdist__unpack_backup_YYY\fP, where \fBXXX\fP is destination and \fBYYY\fP current UNIX timestamp. .TP .B preserve\-archive Don\(aqt delete archive after unpacking. .TP .B onchange Execute this command after unpack. .UNINDENT .SH EXAMPLES .INDENT 0.0 .INDENT 3.5 .sp .EX __directory /opt/cpma require=\(aq__directory/opt/cpma\(aq \e __download /opt/cpma/cnq3.zip \e \-\-url https://cdn.playmorepromode.com/files/cnq3/cnq3\-1.51.zip \e \-\-sum md5:46da3021ca9eace277115ec9106c5b46 require=\(aq__download/opt/cpma/cnq3.zip\(aq \e __unpack /opt/cpma/cnq3.zip \e \-\-backup\-destination \e \-\-preserve\-archive \e \-\-destination /opt/cpma/server # example usecase for \-\-tar\-* args __unpack /root/strelaysrv.tar.gz \e \-\-preserve\-archive \e \-\-destination /usr/local/bin \e \-\-tar\-strip 1 \e \-\-tar\-extra\-args \(aq\-\-wildcards \(dq*/strelaysrv\(dq\(aq .EE .UNINDENT .UNINDENT .SH AUTHORS .sp Ander Punnar .SH COPYING .sp Copyright (C) 2020 Ander Punnar. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. .SH COPYRIGHT ungleich GmbH 2021 .\" Generated by docutils manpage writer. .