From fc2717f1cbf36c50ba595857df54ee18f11f9eaf Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Thu, 26 Jun 2025 16:05:50 -0400 Subject: [PATCH] Improving postgresql installation Installation --- lib/unipar.c | 10 +++++----- support/crdb.sh | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/unipar.c b/lib/unipar.c index 4658400..30e298a 100644 --- a/lib/unipar.c +++ b/lib/unipar.c @@ -158,11 +158,11 @@ while (((c=getopt(argc,argv,optstring))!=EOF)&&(params!=(ARGTYP *)0)) { break; case 'f' : //background/daemon mode foreground=true; - (void) fprintf(stderr,"%s-%s, foreground mode requested\n", + (void) fprintf(stdout,"%s-%s, foreground mode requested\n", shortname,rou_getversion()); break; case 'h' : //requestion program help - (void) fprintf(stderr,"%s-%s\n",shortname,rou_getversion()); + (void) fprintf(stdout,"%s-%s\n",shortname,rou_getversion()); (void) usage_aid(shortname,optstring); params=par_freeparams(params); //no going further break; @@ -176,13 +176,13 @@ while (((c=getopt(argc,argv,optstring))!=EOF)&&(params!=(ARGTYP *)0)) { rootdir=strdup(optarg); break; case 'v' : - (void) fprintf(stderr,"%s:\tVersion <%s>\n", + (void) fprintf(stdout,"%s:\tVersion:%s\n", shortname,rou_getversion()); (void) exit(0); //just display version break; default : - (void) fprintf(stderr,"%s-%s\n",shortname,rou_getversion()); - (void) fprintf(stderr,"\"%s\" unexpected argument designator\n\n", + (void) fprintf(stdout,"%s-%s\n",shortname,rou_getversion()); + (void) fprintf(stdout,"\"%s\" unexpected argument designator\n\n", argv[optind-1]); (void) usage_aid(shortname,optstring); params=par_freeparams(params); diff --git a/support/crdb.sh b/support/crdb.sh index 69cc58b..541cdc9 100755 --- a/support/crdb.sh +++ b/support/crdb.sh @@ -89,4 +89,9 @@ case "$DB_TYPE" in #loading database definition if [ -n "$MSQL" ] ; then cpp -P -D$DB_TYPE /usr/share/$APPNAME/sql/$APPNAME.sql | $MSQL + DIST=`/usr/sbin/receiver -v | cut -d '-' -f2` + #is this de developpement version? + if [ "$DIST" = "dvl" ] ; then + cpp -P -D$DB_TYPE /usr/share/$APPNAME/sql/datatest.sql | $MSQL + fi fi -- 2.47.3