Skip to content

Commit eb27e46

Browse files
author
Craig Ringer
committed
fixup SILENT
1 parent 84a2100 commit eb27e46

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

misc/bashenv/bash_aliases

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ function pgbuild() {
1717
fi
1818
local destname="${1:-"$(basename $(pwd))"}"
1919
local dest="$HOME/pg/$destname"
20-
if [ -z "${NO_SILENT}" ]
20+
if [ -z "${NO_SILENT:-}" ]
2121
then
22-
CONFQUIET="--quiet"
23-
SILENT="-s"
22+
local CONFQUIET="--quiet"
23+
local SILENT="-s"
2424
else
2525
echo "NO_SILENT assigned, going loud"
2626
fi
@@ -72,7 +72,7 @@ function extbuild() {
7272
mkdir -p $HOME/core/old >&/dev/null
7373
mv -f ~/core/*.core ~/core/old/ >&/dev/null
7474
# vpath checking and setup
75-
srcdir="$(pwd)"
75+
local srcdir="$(pwd)"
7676
if [ -z "$NO_VPATH" ]; then
7777
if [ -e "${extgenfile}" ]; then
7878
echo "${extgenfile} exists in srcdir. Cleaning source directory to allow clean vpath build."
@@ -82,7 +82,7 @@ function extbuild() {
8282
echo "${extgenfile} still exists in srcdir, clean vpath build not possible. Clean source dir."
8383
return 1
8484
fi
85-
builddir=$(dirname "$srcdir")/$(basename "$srcdir")-build
85+
local builddir=$(dirname "$srcdir")/$(basename "$srcdir")-build
8686
if [ -z "$builddir" ]; then
8787
echo "unable to determine valid build-directory, aborting"
8888
return 1
@@ -96,16 +96,22 @@ function extbuild() {
9696
mv "$builddir" "$builddir".old
9797
fi
9898
mkdir -p "$builddir";
99-
MAKEFILEARG="-f $srcdir/Makefile"
99+
local MAKEFILEARG="-f $srcdir/Makefile"
100100
else
101101
echo "in-tree build"
102-
builddir=$srcdir
103-
MAKEFILEARG=""
102+
local builddir=$srcdir
103+
local MAKEFILEARG=""
104+
fi
105+
if [ -z "${NO_SILENT:-}" ]
106+
then
107+
local SILENT="-s"
108+
else
109+
echo "NO_SILENT assigned, going loud"
104110
fi
105111
# and finally go
106112
(
107113
cd "$builddir";
108-
PATH="$newpath" make $MAKEFILEARG ${NO_SILENT:-"-s"} REGRESS_LOG_MIN_MESSAGES=debug2 PROVE_FLAGS="--verbose" "$@"
114+
PATH="$newpath" make $MAKEFILEARG $SILENT REGRESS_LOG_MIN_MESSAGES=debug2 PROVE_FLAGS="--verbose" "$@"
109115
)
110116
echo "rebuild and install done"
111117
}
@@ -169,3 +175,4 @@ export JENKINS_CREDS=$HOME/.jenkins_creds
169175
PROMPT_COMMAND='__git_ps1 "\\j \\w" "\\\$ "'
170176
PROMPT_DIRTRIM=2
171177
export PROMPT_COMMAND PROMPT_DIRTRIM
178+

0 commit comments

Comments
 (0)