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

9
vpu.sh
View File

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