checkPackages

Utility for checking libsheepy version used when compiling the packages in local shpPackages
git clone https://noulin.net/git/checkPackages.git
Log | Files | Refs

commit 87b343a9ba6692541b9be2ff16554e57786c04ce
parent fd01cb4f778b1a04713bb0464068ba64da229e01
Author: Remy Noulin <loader2x@gmail.com>
Date:   Sun,  8 Aug 2021 13:00:03 +0000

check more return values

checkPackages.c | 30 +++++++++++++++---------------
package.yml     |  2 +-
2 files changed, 16 insertions(+), 16 deletions(-)

Diffstat:
McheckPackages.c | 30+++++++++++++++---------------
Mpackage.yml | 2+-
2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/checkPackages.c b/checkPackages.c @@ -52,13 +52,13 @@ int main(int ARGC, char** ARGV) { if (not endsWithG(P, shpPDir)) { var s = catS(P,"/package.yml"); createSmallJson(j); - readFileG(&j, s); + pErrorNULL(readFileG(&j, s)); var b = getG(&j, rtChar, "bin"); if (b) { var c = catS(P,"/", b); - normalizePathG(&c); + pError0(normalizePathG(&c)); //logVarG(c); @@ -74,18 +74,18 @@ int main(int ARGC, char** ARGV) { if (foundAOrSo) { if (!atLeastOnePackage) { - pushG(&recompile, header); + pErrorNULL(pushG(&recompile, header)); atLeastOnePackage = true; } - setG(c, -1, 'h'); + pErrorNULL(setG(c, -1, 'h')); var ic = catS("#include \"",c,"\""); - pushNFreeG(&incs, ic); + pErrorNULL(pushNFreeG(&incs, ic)); var base = basename(P); var rec = replaceS(recompileTemplate, "classTemplate", base, 1); toUpper(base[0]); - iReplaceS(&rec, "ClassTemplate", base, 1); - pushNFreeG(&recomp, rec); + pErrorNULL(iReplaceS(&rec, "ClassTemplate", base, 1)); + pErrorNULL(pushNFreeG(&recomp, rec)); } freeG(ld); @@ -100,17 +100,17 @@ int main(int ARGC, char** ARGV) { freeG(dirs); if (not isEmptyG(recompile)) { - appendG(&recompile, incs); - pushG(&recompile, mainc); - appendG(&recompile, recomp); - pushG(&recompile, footer); - writeFileG(recompile, recompileC); - fileChmod(recompileC, 0711); + pErrorNULL(appendG(&recompile, incs)); + pErrorNULL(pushG(&recompile, mainc)); + pErrorNULL(appendG(&recompile, recomp)); + pErrorNULL(pushG(&recompile, footer)); + pError0(writeFileG(recompile, recompileC)); + pError0(fileChmod(recompileC, 0711)); freeG(recompile); free(incs); free(recomp); - logSystemf("./%s", recompileC); - rmAll(recompileC); + pErrorNot0(logSystemf("./%s", recompileC)); + pError0(rmAll(recompileC)); } } // vim: set expandtab ts=2 sw=2: diff --git a/package.yml b/package.yml @@ -1,6 +1,6 @@ --- name: checkPackages - version: 0.0.4 + version: 0.0.5 description: "check libsheepy version in already compiled packages in local shpPackages, recompile when it doesn't match current libsheepy version in the system" bin: ./checkPackages.c repository: