diff options
Diffstat (limited to 'usr.sbin/pc-sysinstall/backend-query/list-packages.sh')
-rwxr-xr-x | usr.sbin/pc-sysinstall/backend-query/list-packages.sh | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/usr.sbin/pc-sysinstall/backend-query/list-packages.sh b/usr.sbin/pc-sysinstall/backend-query/list-packages.sh index b5d93f5..45941ff 100755 --- a/usr.sbin/pc-sysinstall/backend-query/list-packages.sh +++ b/usr.sbin/pc-sysinstall/backend-query/list-packages.sh @@ -37,50 +37,50 @@ NARGS=0 if [ ! -f "${PKGDIR}/INDEX" ] then - echo "Error: please fetch package index with get-packages!" - exit 1 + echo "Error: please fetch package index with get-packages!" + exit 1 fi if [ ! -f "${PKGDIR}/INDEX.parsed" ] then - parse_package_index + parse_package_index fi if [ -n "${PACKAGE_CATEGORY}" ] then - NARGS=$((NARGS+1)) + NARGS=$((NARGS+1)) fi if [ -n "${PACKAGE_NAME}" ] then - NARGS=$((NARGS+1)) + NARGS=$((NARGS+1)) fi if [ "${NARGS}" -eq "0" ] then - show_packages + show_packages elif [ "${NARGS}" -eq "1" ] then - if [ "${PACKAGE_CATEGORY}" = "@INDEX@" ] - then - if [ -f "${PKGDIR}/INDEX" ] - then - echo "${PKGDIR}/INDEX" - exit 0 - else - exit 1 - fi + if [ "${PACKAGE_CATEGORY}" = "@INDEX@" ] + then + if [ -f "${PKGDIR}/INDEX" ] + then + echo "${PKGDIR}/INDEX" + exit 0 + else + exit 1 + fi - else - show_packages_by_category "${PACKAGE_CATEGORY}" - fi + else + show_packages_by_category "${PACKAGE_CATEGORY}" + fi elif [ "${NARGS}" -eq "2" ] then - show_package_by_name "${PACKAGE_CATEGORY}" "${PACKAGE_NAME}" + show_package_by_name "${PACKAGE_CATEGORY}" "${PACKAGE_NAME}" else - show_packages + show_packages fi |