mirror of
https://github.com/sbopkg/sbopkg
synced 2024-12-28 09:58:58 +01:00
Fix '-s' command line switch.
The '-s' switch got broken, mainly because it used "leaking" variables. Give it a proper interface, and use that. Also, properly check for search failures. Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
This commit is contained in:
parent
e3421a6bd5
commit
30ad5a995d
1 changed files with 11 additions and 3 deletions
|
@ -2042,6 +2042,11 @@ string_search() {
|
|||
|
||||
show_readme() {
|
||||
# Show the package's text files.
|
||||
# $1 = Package path
|
||||
# $2 = Package name
|
||||
|
||||
local PKGPATH=$1
|
||||
local PKGNAME=$2
|
||||
|
||||
cd $REPO_DIR
|
||||
$PAGER \
|
||||
|
@ -3668,9 +3673,12 @@ else
|
|||
check_if_repo_exists
|
||||
for PKGSEARCH in "$SEARCH"; do
|
||||
echo "Searching for $PKGSEARCH"
|
||||
search_package "$PKGSEARCH"
|
||||
pick_file info "$PKGPATH" "$PKGSEARCH"
|
||||
show_readme
|
||||
if search_package $PKGSEARCH; then
|
||||
pick_file info $PKGPATH $PKGSEARCH
|
||||
show_readme $PKGPATH $PKGSEARCH
|
||||
else
|
||||
echo "ERROR: Package \"$PKGSEARCH\" not found." >&2
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue