Chinaunix首页 | 论坛 | 博客
  • 博客访问: 47579
  • 博文数量: 7
  • 博客积分: 651
  • 博客等级: 上士
  • 技术积分: 140
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-30 10:57
文章分类

全部博文(7)

文章存档

2011年(3)

2010年(1)

2009年(3)

我的朋友
最近访客

分类: LINUX

2011-04-02 14:01:12

在linux下的包管理系统很多,有rpm,deb等。但这两个包管理工具的使用相对windows都比较复杂。makeself是一个小巧的shell工具,它将你的程序打成一个可执行的shell包,安装更加容易方便。
  1. $ makeself --help
  2. Usage: /usr/bin/makeself [params] archive_dir file_name label [startup_script] [args]
  3. params can be one or more of the following :
  4. --version | -v : Print out Makeself version number and exit
  5. --help | -h : Print out this help message
  6. --gzip : Compress using gzip (default if detected)
  7. --bzip2 : Compress using bzip2 instead of gzip
  8. --compress : Compress using the UNIX 'compress' command
  9. --nocomp : Do not compress the data
  10. --notemp : The archive will create archive_dir in the
  11. current directory and uncompress in ./archive_dir
  12. --copy : Upon extraction, the archive will first copy itself to
  13. a temporary directory
  14. --append : Append more files to an existing Makeself archive
  15. The label and startup scripts will then be ignored
  16. --current : Files will be extracted to the current directory.
  17. Implies --notemp.
  18. --nomd5 : Don't calculate an MD5 for archive
  19. --nocrc : Don't calculate a CRC for archive
  20. --header file : Specify location of the header script
  21. --follow : Follow the symlinks in the archive
  22. --nox11 : Disable automatic spawn of a xterm
  23. --nowait : Do not wait for user input after executing embedded
  24. program from an xterm
  25. --lsm file : LSM file describing the package
  26. Do not forget to give a fully qualified startup script name
  27. (i.e. with a ./ prefix if inside the archive).
 
比如我们将example目录下的程序打包
  1. $ makeself example example.sh test-makeself ./example/setup.sh
包打好后
  1. $ chmod a+x example.sh
  2. $ ./example.sh --help
可以看到如何列出(list)包中的文件,解压(--target)包中的文件到某特定目录等
  1. $ ./example.sh --info ## 打印和该软件包相关的信息
  2. $ ./example.sh --list ## 列出包中所有文件
  3. $ ./example.sh --target example.new --keep ## 解压到example.new目录并安装,安装完成后不删除该目录
 
相关连接:

阅读(965) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~