Skip to content

Commit c32ffe4

Browse files
committed
setup - added per package menu option to show package info
Adds an option to show some of the main retropie.pkg information for an installed package. Will be expanded in the future, but it's useful to see more information about what is installed now we have it.
1 parent 9b3371e commit c32ffe4

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

scriptmodules/admin/setup.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,11 @@ function package_setup() {
269269

270270
local help="${__mod_info[$id/desc]}\n\n${__mod_info[$id/help]}"
271271
if [[ -n "$help" ]]; then
272-
options+=(H "Package Help")
272+
options+=(H "Package help")
273+
fi
274+
275+
if [[ "$is_installed" -eq 1 ]]; then
276+
options+=(V "Package version information")
273277
fi
274278

275279
cmd=(dialog --backtitle "$__backtitle" --cancel-label "Back" --default-item "$default" --menu "Choose an option for $id\n$status" 22 76 16)
@@ -328,6 +332,23 @@ function package_setup() {
328332
H)
329333
printMsgs "dialog" "$help"
330334
;;
335+
V)
336+
local info
337+
rp_loadPackageInfo "$id"
338+
read -r -d '' info << _EOF_
339+
Package Origin: ${__mod_info[$id/pkg_origin]}
340+
Build Date: ${__mod_info[$id/pkg_date]}
341+
342+
Built from source via:
343+
344+
Type: ${__mod_info[$id/pkg_repo_type]}
345+
URL: ${__mod_info[$id/pkg_repo_url]}
346+
Branch: ${__mod_info[$id/pkg_repo_branch]}
347+
Commit: ${__mod_info[$id/pkg_repo_commit]}
348+
Date: ${__mod_info[$id/pkg_repo_date]}
349+
_EOF_
350+
printMsgs "dialog" "$info"
351+
;;
331352
Z)
332353
rp_callModule "$id" clean
333354
printMsgs "dialog" "$__builddir/$id has been removed."

0 commit comments

Comments
 (0)