放在/usr/local/bin下,挺好用
#!/bin/sh
# this script converts an rpm into a plain tarball
mkdir $$.cpio
rpm2cpio $@ > $$.cpio/foo
cd $$.cpio
cpio -i -m -d < foo
rm -f foo
find . -type d -perm 700 -exec chmod 755 {} \;
tar cvzf ../`basename $@ .rpm`.tar.gz .
cd ../
rm -rf $$.cpio
posted on 2008-06-18 11:37
liunix 阅读(331)
评论(0) 编辑 收藏