Improvements in .templates/bin scripts:
* obsolescent egrep calls have removed; * /usr/local/bin has been added to PATH for cron calls.
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
# Author: Kovács Zoltán <kovacs.zoltan@smartfront.hu>
|
||||
# Kovács Zoltán <kovacsz@marcusconsulting.hu>
|
||||
# License: GNU/GPL v3+ (https://www.gnu.org/licenses/gpl-3.0.en.html)
|
||||
# 2026-05-04 v1.1
|
||||
# mod: the obsolescent egrep calls have been changed to POSIX grep -E calls.
|
||||
# 2023-06-18 v1.0
|
||||
# new: forked from the "SMARTERP_skeleton" repository.
|
||||
# 2022-11-03 v0.4
|
||||
@@ -131,7 +133,7 @@ done; shift $((OPTIND -1))
|
||||
# Common dependencies.
|
||||
TR=$(which tr 2>/dev/null)
|
||||
if [ -z "$TR" ]; then echo "$MSG_MISSINGDEP tr."; exit 1 ; fi
|
||||
for item in basename df date dirname egrep grep gzip hostname id \
|
||||
for item in basename df date dirname grep gzip hostname id \
|
||||
pwd sed tail tee $additem
|
||||
do
|
||||
if [ -n "$(which $item)" ]
|
||||
@@ -346,8 +348,8 @@ else
|
||||
# 1st the schema with some arbitrary conversions.
|
||||
"$PG_DUMP" $CONNECT \
|
||||
$PGDUMPACLS --schema-only -d "$PGDATABASE" | \
|
||||
"$EGREP" -iv '^SET idle_in_transaction_session_timeout =' | \
|
||||
"$EGREP" -iv '^SET default_table_access_method =' | \
|
||||
"$GREP" -E -iv '^SET idle_in_transaction_session_timeout =' | \
|
||||
"$GREP" -E -iv '^SET default_table_access_method =' | \
|
||||
"$SED" 's/FUNCTION =/PROCEDURE = /' | \
|
||||
"$SED" "s/CURRENT_DATE/\('now'::text\)::date/g"
|
||||
# 2nd the data as COPY statements.
|
||||
@@ -358,8 +360,8 @@ else
|
||||
# 1st the schema with some arbitrary conversions.
|
||||
"$PG_DUMP" $CONNECT \
|
||||
$PGDUMPACLS --schema-only -d "$PGDATABASE" | \
|
||||
"$EGREP" -iv '^SET idle_in_transaction_session_timeout =' | \
|
||||
"$EGREP" -iv '^SET default_table_access_method =' | \
|
||||
"$GREP" -E -iv '^SET idle_in_transaction_session_timeout =' | \
|
||||
"$GREP" -E -iv '^SET default_table_access_method =' | \
|
||||
"$SED" 's/FUNCTION =/PROCEDURE = /' | \
|
||||
"$SED" "s/CURRENT_DATE/\('now'::text\)::date/g" \
|
||||
>"$PGDUMPFILE" 2>>"$logfile"; result=$?
|
||||
|
||||
Reference in New Issue
Block a user