Commit 25cb00fb authored by sebt3's avatar sebt3

Added list_installed option

parent ca62d301
......@@ -110,6 +110,19 @@ install() {
}
}
list_installed() {
precheck
getRepoInfo|while read id url comps;do
for c in $comps;do
getPackageMD5s "$id" "$c"|while read pck md;do
if [ -e "$(getTarget)/${pck}.dbp" ];then
printf "%s\033[30G%s\n" "$pck" "$(getPackageName "$pck" "$id" "$c")"
fi
done
done
done
}
list_upgrade() {
precheck
getRepoInfo|while read id url comps;do
......@@ -146,6 +159,7 @@ $1 {install|list|update}
install <pck> : Install given package
update : Update known package lists
list : List all availables packages
list_installed: List all installed packages
list_upgrade : List all upgradables packages
upgrade : Upgrade known package
ENDHELP
......@@ -156,6 +170,7 @@ main() {
update) update;;
list) list;;
list_upgrade) list_upgrade;;
list_installed) list_installed;;
upgrade) upgrade;;
install) install "$2";;
help|*) showHelp "$0";;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment