diff --git a/doc/src/Section_start.txt b/doc/src/Section_start.txt index affcae1e5494fdd02d5849298cb7f50dc760c186..6473c346dce1acbdf9a220d4149c6925de0c0cc3 100644 --- a/doc/src/Section_start.txt +++ b/doc/src/Section_start.txt @@ -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 diff --git a/src/Makefile b/src/Makefile index e0f0db77fe3d5eea0ed95b04541047344919ee45..03f40721324e8d1712d967481f7611484be0c558 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 '' diff --git a/src/Package.sh b/src/Package.sh index ce3819b590e3a439652931e14c358b537b79f4f0..72e8761e21efa1cf3f97446f44791a7f4de6413b 100644 --- a/src/Package.sh +++ b/src/Package.sh @@ -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