Add make package-installed command

This commit is contained in:
Stan Moore
2018-03-01 10:39:06 -07:00
parent 77efd3dfb3
commit 8d0fdb17a6
3 changed files with 18 additions and 0 deletions

View File

@ -803,6 +803,10 @@ currently installed. For those that are installed, it will list any
files that are different in the src directory and package
sub-directory.
Typing "make package-installed" or "make pi" will list which packages are
currently installed, without listing the status of packages that are not
installed.
Typing "make package-update" or "make pu" will overwrite src files
with files from the package sub-directories if the package is
installed. It should be used after a patch has been applied, since

View File

@ -100,6 +100,7 @@ help:
@echo ''
@echo 'make package list available packages and their dependencies'
@echo 'make package-status (ps) status of all packages'
@echo 'make package-installed (pi) list of installed packages'
@echo 'make yes-package install a single pgk in src dir'
@echo 'make no-package remove a single pkg from src dir'
@echo 'make yes-all install all pgks in src dir'
@ -260,6 +261,7 @@ package:
@echo 'make package list available packages'
@echo 'make package list available packages'
@echo 'make package-status (ps) status of all packages'
@echo 'make package-installed (pi) list of installed packages'
@echo 'make yes-package install a single pgk in src dir'
@echo 'make no-package remove a single pkg from src dir'
@echo 'make yes-all install all pgks in src dir'
@ -354,6 +356,7 @@ lib-%:
fi; touch main.cpp
# status = list src files that differ from package files
# installed = list of installed packages
# update = replace src files with newer package files
# overwrite = overwrite package files with newer src files
# diff = show differences between src and package files
@ -364,6 +367,10 @@ package-status ps:
@echo ''
@for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p status; done
package-installed pi:
@for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p installed; done
@for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p installed; done
package-update pu: purge
@for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p update; done
@echo ''

View File

@ -34,6 +34,13 @@ if (test $2 = "status") then
echo "Installed NO: package $1"
fi
# installed, list only if installed
elif (test $2 = "installed") then
if (test $installed = 1) then
echo "Installed YES: package $1"
fi
# update, only if installed
# perform a re-install, but only if the package is already installed