squidpm

the squid package manager
git clone git://squid-tech.com/squidpm.git
Log | Files | Refs | README | LICENSE

commit 90aa51c713cef27aad108ce77a3acc382d2e098c
parent 923a7ffce53f18ff31a1a15a6537d6b2e1c0ce5a
Author: Josh Moore <jxm5210@rit.edu>
Date:   Tue, 14 Jan 2020 15:12:46 -0500

Add list command

Diffstat:
Msquidpm.sh | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/squidpm.sh b/squidpm.sh @@ -22,7 +22,7 @@ if [ "$#" -eq 0 ]; then exit fi -if [ "$#" -ne 2 ]; then +if [ "$#" -gt 2 ]; then echo "$0: Invalid number of arguments." exit fi @@ -33,10 +33,16 @@ if [[ $EUID > 0 ]]; then exit fi - # resolve the actual squidpm directory SPMDIR=$(dirname $(readlink -f "$0")) +if [ $1 == "list" ]; then + # list all installed packages + ls -1 $SPMDIR/repos/ + exit +fi + + # make sure the package exists if [ ! -f $SPMDIR/packages/$2 ]; then echo "$0: Unrecognized package '$2'."