undeb--解压deb包的脚本 - digwtx's Blog
undeb--解压deb包的脚本
digwtx
posted @ 2009年7月22日 05:27
in 未分类
, 10329 阅读
#!/bin/sh
#
# This should work with the GNU version of tar and gzip!
# This should work with the bash or ash shell!
# Requires the programs (ar, tar, gzip, and the pager more or less).
#
usage() {
echo "Usage: undeb -c package.deb <Print control file info>"
echo " undeb -l package.deb <List contents of deb package>"
echo " undeb -x package.deb /foo/boo <Extract deb package to this directory,"
echo " put . for current directory>"
exit
}
deb=$2
exist() {
if [ "$deb" = "" ]; then
usage
elif [ ! -s "$deb" ]; then
echo "Can't find $deb!"
exit
fi
}
if [ "$1" = "" ]; then
usage
elif [ "$1" = "-l" ]; then
exist
type more >/dev/null 2>&1 && pager=more
type less >/dev/null 2>&1 && pager=less
[ "$pager" = "" ] && echo "No pager found!" && exit
(ar -p $deb control.tar.gz | tar -xzO *control ; echo -e "\nPress enter to scroll, q to Quit!\n" ; ar -p $deb data.tar.gz | tar -tzv) | $pager
exit
elif [ "$1" = "-c" ]; then
exist
ar -p $deb control.tar.gz | tar -xzO *control
exit
elif [ "$1" = "-x" ]; then
exist
if [ "$3" = "" ]; then
usage
elif [ ! -d "$3" ]; then
echo "No such directory $3!"
exit
fi
ar -p $deb data.tar.gz | tar -xzvpf - -C $3 || exit
echo
echo "Extracted $deb to $3!"
exit
else
usage
fi
#
# This should work with the GNU version of tar and gzip!
# This should work with the bash or ash shell!
# Requires the programs (ar, tar, gzip, and the pager more or less).
#
usage() {
echo "Usage: undeb -c package.deb <Print control file info>"
echo " undeb -l package.deb <List contents of deb package>"
echo " undeb -x package.deb /foo/boo <Extract deb package to this directory,"
echo " put . for current directory>"
exit
}
deb=$2
exist() {
if [ "$deb" = "" ]; then
usage
elif [ ! -s "$deb" ]; then
echo "Can't find $deb!"
exit
fi
}
if [ "$1" = "" ]; then
usage
elif [ "$1" = "-l" ]; then
exist
type more >/dev/null 2>&1 && pager=more
type less >/dev/null 2>&1 && pager=less
[ "$pager" = "" ] && echo "No pager found!" && exit
(ar -p $deb control.tar.gz | tar -xzO *control ; echo -e "\nPress enter to scroll, q to Quit!\n" ; ar -p $deb data.tar.gz | tar -tzv) | $pager
exit
elif [ "$1" = "-c" ]; then
exist
ar -p $deb control.tar.gz | tar -xzO *control
exit
elif [ "$1" = "-x" ]; then
exist
if [ "$3" = "" ]; then
usage
elif [ ! -d "$3" ]; then
echo "No such directory $3!"
exit
fi
ar -p $deb data.tar.gz | tar -xzvpf - -C $3 || exit
echo
echo "Extracted $deb to $3!"
exit
else
usage
fi
2011年6月10日 14:23
谢谢分享.
2019年6月03日 18:49
The happy code version is the version for the system making the coding files of many types and the proper variation. The UNDEB is the china my assignment services review a proper service of the system upgrading files and the alongside happy forum.
2019年6月21日 01:40
I have a good new for xbox live code game lover here you can get free xbox live membership codes if you want free xbox code live membership then you can click on the link thank you
2019年10月14日 09:30
You're my end and my beginning
Even when I lose I'm winning
2022年8月17日 21:11
The Secondary School Leaving Certificate SSLC Class 10th examinations for the Kerala Education Board will typically take place in March. In March of 2023, tests will be held for this year as well. More than eight lakh individuals who are enrolled in Kerala State Board's SSLC 10th class take this test each year. Kerala SSLC Question Paper 2023 Candidates looking for this year's Kerala 10th Class Question Paper 2023 and the Kerala SSLC Question Paper & New Question Paper 2023 download on the internet In November, the Kerala SSLC 10th Exam New Model Paper 2023 and Kerala SSLC 10th Sample Question Paper 2023 were revised. The Kerala SSLC Question Paper 2023 in both Malayalam and English will also be accessible in November 2023.
2022年9月11日 13:19
Each language learner will surely employ a unique system for memorizing word forms, retaining their meanings, and recalling how to use words. Depending on the context, each word will have a specific appropriate interpretation. Simple support techniques that can be used on internet-connected gadgets are being developed as technology advances. To make it simpler to meet the diverse needs of each user, the company's founder develops a variety of support solutions. Therefore, this is the reason [url=https://wordsfromletters.co/]words from letters[/url] exists.
2022年9月26日 15:47
功能:用于解开DEB软件包 dinosaur game
2022年10月05日 15:15
2022年10月05日 15:30
I generally watch them to learn more, then play <a href="https://stumble-guys.com">stumble guys</a> for fun; it's a good knockout game. Provoke the wits of young men
2022年10月05日 15:32
[url=https://www.google.com/]google[/url]
2022年11月18日 11:09
i followed the steps but got the problem.
2022年11月18日 20:30
In this article, I'll show you how to set up a virtual machine in Windows 10. You can use this link if you've forgotten your Windows 10 password.
2023年3月07日 09:39
this is an informative post and it is very beneficial and knowledgeable.
2023年7月19日 17:49
I'll walk you through the process of installing a virtual machine on Windows 10 here in this article. If you've forgotten the password to your Windows 10 account, you can utilize the link provided here.
2024年7月04日 19:36
Overpowering data, major and stunning new development, as layout goliath stuff with sharp appraisals and assessments, stores of overwhelming data and motivation, the two of which I truly need, sensibly of thought a particularly solid data here. youibot autonomous mobile robots amr amr robot
2024年10月14日 14:28
This article is absolutely fantastic! The way you blend creativity with practical tips makes it not only enjoyable to read but also incredibly inspiring. Your passion shines through every word, and I love how you encourage readers to embrace their own DIY journeys. Keep up the amazing work! <a href="https://retrobowl-game.io/">Retro bowl</a>
2024年10月15日 17:06
The music in each stage determines the tempo at which you can do jumps geometry dash
2024年12月03日 12:00
The provided script outlines how to handle .deb packages using the undeb command. It includes options to print control file information, list contents, or extract files to a specified directory. Just like mastering levels in <a href="https://geometrydashjump.com/">Geometry Dash</a> requires precision and skill, effectively using this script demands attention to detail.=
2024年12月03日 12:01
The provided script outlines how to handle .deb packages using the undeb command. It includes options to print control file information, list contents, or extract files to a specified directory. Just like mastering levels in <a href="https://geometrydashjump.com/">Geometry Dash</a> requires precision and skill, effectively using this script demands attention to detail.=
<a href="https://geometrydashjump.com/">Geometry Dash</a>
[url=https://geometrydashjump.com/]Geometry Dash[/url]
[Geometry Dash](https://geometrydashjump.com/)
https://geometrydashjump.com/