Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
分享一个deb打包解包脚本,方便解决依赖不满足等问题
Theme area
1966
views ·
0
replies ·
To
floor
Go
liyujiang
deepin
2016-09-10 07:34
Author
打包脚本:buildDeb.sh
#!/bin/bash
echo -e "当前目录:`pwd`\n\n"
arr=()
i=0
for dir in *; do
if test -d $dir; then
echo "${i}、${dir}"
arr[$i]=$dir
i=`expr $i + 1`
fi
done
echo -e -n "\n打包,请输入deb目录序号:"
read INDEX
DEB_DIR=${arr[$INDEX]}
chmod -R 755 ${DEB_DIR}/DEBIAN
echo "即将打包为:${DEB_DIR}.deb"
dpkg-deb --build ${DEB_DIR}
echo "打包结束"
echo -e "\n\n按回车键退出(Enter)"
read -n1
解包脚本:extractDeb.sh
#!/bin/bash
echo -e "当前目录:`pwd`\n\n"
arr=()
i=0
for file in *.deb; do
if test -f $file; then
echo "${i}、${file}"
arr[$i]=$file
i=`expr $i + 1`
fi
done
echo -e -n "\n解包,请输入deb文件序号:"
read INDEX
DEB_NAME=${arr[$INDEX]}
echo "即将解包到:${DEB_NAME/.deb/}"
dpkg-deb --extract ${DEB_NAME} ${DEB_NAME/.deb/}
echo "解包结束"
echo -e "\n\n按回车键退出(Enter)"
read -n1
Reply
Like 0
Favorite
View the author
All Replies
No replies yet
Please
sign
in first
Featured Collection
Change
Nuntia - Modern IMAP/SMTP mail client for Deepin (Beta tester wanted!)
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
Adding a Dancing Spectrum Bar to the Deepin Taskbar | deepin-spectrum
Popular Events
More
#!/bin/bash
echo -e "当前目录:`pwd`\n\n"
arr=()
i=0
for dir in *; do
if test -d $dir; then
echo "${i}、${dir}"
arr[$i]=$dir
i=`expr $i + 1`
fi
done
echo -e -n "\n打包,请输入deb目录序号:"
read INDEX
DEB_DIR=${arr[$INDEX]}
chmod -R 755 ${DEB_DIR}/DEBIAN
echo "即将打包为:${DEB_DIR}.deb"
dpkg-deb --build ${DEB_DIR}
echo "打包结束"
echo -e "\n\n按回车键退出(Enter)"
read -n1
解包脚本:extractDeb.sh
#!/bin/bash
echo -e "当前目录:`pwd`\n\n"
arr=()
i=0
for file in *.deb; do
if test -f $file; then
echo "${i}、${file}"
arr[$i]=$file
i=`expr $i + 1`
fi
done
echo -e -n "\n解包,请输入deb文件序号:"
read INDEX
DEB_NAME=${arr[$INDEX]}
echo "即将解包到:${DEB_NAME/.deb/}"
dpkg-deb --extract ${DEB_NAME} ${DEB_NAME/.deb/}
echo "解包结束"
echo -e "\n\n按回车键退出(Enter)"
read -n1