ein*_*lum 4 archive shell-script
我有一个自制存档,我想看看里面有什么,即。将提取哪些文件,而不是实际运行其脚本部分。我怎么做?
我宁愿不实际提取任何内容,但如果这是唯一的方法,那么我愿意进行提取 - 只要其中的 (ba)sh 代码都没有实际运行。
生成的存档有一个--list选项,您可以使用它来列出其内容。
作为参考,我正在讨论 Debian 中的这个版本:
ii makeself 2.2.0-1 all utility to generate self-extractables
Run Code Online (Sandbox Code Playgroud)
它在脚本中生成这个块:
MS_Help()
{
cat << EOH >&2
Makeself version 2.2.0
1) Getting help or info about $0 :
$0 --help Print this message
$0 --info Print embedded info : title, default target directory, embedded script ...
$0 --lsm Print embedded lsm entry (or no LSM)
$0 --list Print the list of files in the archive
$0 --check Checks integrity of the archive
2) Running $0 :
$0 [options] [--] [additional arguments to embedded script]
with following options (in that order)
--confirm Ask before running embedded script
--quiet Do not print anything except error messages
--noexec Do not run embedded script
--keep Do not erase target directory after running
the embedded script
--noprogress Do not show the progress during the decompression
--nox11 Do not spawn an xterm
--nochown Do not give the extracted files to the current user
--target dir Extract directly to a target directory
directory path can be either absolute or relative
--tar arg1 [arg2 ...] Access the contents of the archive through the tar command
-- Following arguments will be passed to the embedded script
EOH
}
Run Code Online (Sandbox Code Playgroud)
它的手册页需要一些工作,但脚本很容易阅读 - 请参阅git 存储库
进一步阅读:makeself - 在 Unix 上制作可自解压的档案
| 归档时间: |
|
| 查看次数: |
6330 次 |
| 最近记录: |