mirror of
https://github.com/sbopkg/sbopkg
synced 2025-01-18 10:26:27 +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_readme() {
|
||||||
# Show the package's text files.
|
# Show the package's text files.
|
||||||
|
# $1 = Package path
|
||||||
|
# $2 = Package name
|
||||||
|
|
||||||
|
local PKGPATH=$1
|
||||||
|
local PKGNAME=$2
|
||||||
|
|
||||||
cd $REPO_DIR
|
cd $REPO_DIR
|
||||||
$PAGER \
|
$PAGER \
|
||||||
|
@ -3668,9 +3673,12 @@ else
|
||||||
check_if_repo_exists
|
check_if_repo_exists
|
||||||
for PKGSEARCH in "$SEARCH"; do
|
for PKGSEARCH in "$SEARCH"; do
|
||||||
echo "Searching for $PKGSEARCH"
|
echo "Searching for $PKGSEARCH"
|
||||||
search_package "$PKGSEARCH"
|
if search_package $PKGSEARCH; then
|
||||||
pick_file info "$PKGPATH" "$PKGSEARCH"
|
pick_file info $PKGPATH $PKGSEARCH
|
||||||
show_readme
|
show_readme $PKGPATH $PKGSEARCH
|
||||||
|
else
|
||||||
|
echo "ERROR: Package \"$PKGSEARCH\" not found." >&2
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue