From c367af308b66cda1ea45aea471fd2c8ed42b9679 Mon Sep 17 00:00:00 2001 From: mollusk Date: Tue, 26 Feb 2019 01:35:53 -0700 Subject: [PATCH] vpu.sh: add search feature Former-commit-id: ca9735dfc1b0b6ef2687993a867dcbf8c3cd9515 Former-commit-id: 85a904b8dc3c512795cd304349c9c928fe764b5e --- vpu.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/vpu.sh b/vpu.sh index cc7f465..b846244 100755 --- a/vpu.sh +++ b/vpu.sh @@ -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 \ No newline at end of file +esac