squidpm

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

commit ae52eb1b286e121a9ccafbf312cdaa5208b308e8
parent ad1fa3b3a48caa2bdc5c5b740cd03a8edda83e90
Author: Josh Moore <jxm5210@rit.edu>
Date:   Tue, 14 Jan 2020 15:32:09 -0500

Add update verification

Diffstat:
Msquidpm.sh | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/squidpm.sh b/squidpm.sh @@ -79,6 +79,19 @@ elif [ $1 == "update" ]; then fi # if so, update the package + # check whether the package needs to be updated + cd $SPMDIR/repos/$2 + git remote update + + LOCAL=$(git rev-parse @) + REMOTE=$(git rev-parse $(git rev-parse --abbrev-ref HEAD)) + + if [ LOCAL == REMOTE ]; then + echo "$0: Package '$2' is up-to-date." + exit + fi + + # remote and local are different, update the packages /bin/sh $SPMDIR/packages/$2 update else echo "$0: Invalid operation '$1'."