vpu.sh: add search feature

Former-commit-id: ca9735dfc1b0b6ef2687993a867dcbf8c3cd9515
Former-commit-id: 85a904b8dc3c512795cd304349c9c928fe764b5e
This commit is contained in:
mollusk 2019-02-26 01:35:53 -07:00
parent 0bd30755a2
commit c367af308b

11
vpu.sh
View File

@ -173,6 +173,9 @@ function checkSetup() {
}
search_srcpkgs(){
ls ${repoPath}/srcpkgs | grep $1
}
case "${1}" in
@ -185,7 +188,7 @@ case "${1}" in
${adminCmd} xbps-install -R ${repoPath}/hostdir/binpkgs ${package}
;;
-ib|ib)
install-nonfree|-inf|-inf)
${repoPath}/xbps-src pkg ${package}
if [ -f /usr/bin/sudo ];then
adminCmd="sudo"
@ -193,6 +196,10 @@ case "${1}" in
fi
${adminCmd} xbps-install -R ${repoPath}/hostdir/binpkgs/nonfree ${package}
;;
search|-s|s)
search_srcpkgs "${2}"
;;
check | -ck | ck)
checkSetup
@ -214,4 +221,4 @@ case "${1}" in
;;
esac
esac