Skip to content

Commit 6cfb925

Browse files
committed
Update use of SUDO_PASSWORD
1 parent a6ad580 commit 6cfb925

File tree

160 files changed

+569
-569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+569
-569
lines changed

build-acl.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ echo "Installing package"
179179
echo "**************************"
180180

181181
MAKE_FLAGS=("install")
182-
if [[ -n "$SUDO_PASSWORD" ]]; then
183-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
184-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
182+
if [[ -n "${SUDO_PASSWORD}" ]]; then
183+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
184+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
185185
else
186186
"${MAKE}" "${MAKE_FLAGS[@]}"
187187
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-apg.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ echo "Installing anyways..."
139139
echo "***********************"
140140

141141
MAKE_FLAGS=("install" "APG_PREFIX=${INSTX_PREFIX}")
142-
if [[ -n "$SUDO_PASSWORD" ]]; then
143-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
144-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
142+
if [[ -n "${SUDO_PASSWORD}" ]]; then
143+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
144+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
145145
else
146146
"${MAKE}" "${MAKE_FLAGS[@]}"
147147
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-attr.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ echo "Installing package"
178178
echo "***************************"
179179

180180
MAKE_FLAGS=("install")
181-
if [[ -n "$SUDO_PASSWORD" ]]; then
182-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
183-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
181+
if [[ -n "${SUDO_PASSWORD}" ]]; then
182+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
183+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
184184
else
185185
"${MAKE}" "${MAKE_FLAGS[@]}"
186186
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-autoconf.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ echo "Installing package"
133133
echo "**********************"
134134

135135
MAKE_FLAGS=("install")
136-
if [[ -n "$SUDO_PASSWORD" ]]; then
137-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
138-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
136+
if [[ -n "${SUDO_PASSWORD}" ]]; then
137+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
138+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
139139
else
140140
"${MAKE}" "${MAKE_FLAGS[@]}"
141141
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-autogen.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ echo "Installing package"
169169
echo "**********************"
170170

171171
MAKE_FLAGS=("install")
172-
if [[ -n "$SUDO_PASSWORD" ]]; then
173-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
174-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
172+
if [[ -n "${SUDO_PASSWORD}" ]]; then
173+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
174+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
175175
else
176176
"${MAKE}" "${MAKE_FLAGS[@]}"
177177
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-automake.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ echo "Installing package"
129129
echo "**********************"
130130

131131
MAKE_FLAGS=("install")
132-
if [[ -n "$SUDO_PASSWORD" ]]; then
133-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
134-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
132+
if [[ -n "${SUDO_PASSWORD}" ]]; then
133+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
134+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
135135
else
136136
"${MAKE}" "${MAKE_FLAGS[@]}"
137137
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-b2sum.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ echo "Installing package"
171171
echo "**********************"
172172

173173
MAKE_FLAGS=("install" "PREFIX=${INSTX_PREFIX}")
174-
if [[ -n "$SUDO_PASSWORD" ]]; then
175-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
176-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
174+
if [[ -n "${SUDO_PASSWORD}" ]]; then
175+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
176+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
177177
else
178178
"${MAKE}" "${MAKE_FLAGS[@]}"
179179
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-bash.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ echo "Installing anyways..."
187187
echo "**********************"
188188

189189
MAKE_FLAGS=("install")
190-
if [[ -n "$SUDO_PASSWORD" ]]; then
191-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
192-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
193-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/copy-sources.sh" "${PWD}" "${INSTX_SRCDIR}/${BASH_DIR}"
190+
if [[ -n "${SUDO_PASSWORD}" ]]; then
191+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
192+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
193+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/copy-sources.sh" "${PWD}" "${INSTX_SRCDIR}/${BASH_DIR}"
194194
else
195195
"${MAKE}" "${MAKE_FLAGS[@]}"
196196
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-bayonne.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ echo "Installing package"
189189
echo "**********************"
190190

191191
MAKE_FLAGS=("install")
192-
if [[ -n "$SUDO_PASSWORD" ]]; then
193-
printf "%s\n" "$SUDO_PASSWORD" | sudo -E -S "${MAKE}" "${MAKE_FLAGS[@]}"
192+
if [[ -n "${SUDO_PASSWORD}" ]]; then
193+
printf "%s\n" "${SUDO_PASSWORD}" | sudo -E -S "${MAKE}" "${MAKE_FLAGS[@]}"
194194
else
195195
"${MAKE}" "${MAKE_FLAGS[@]}"
196196
fi

build-bc.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ echo "Installing package"
156156
echo "**********************"
157157

158158
MAKE_FLAGS=("install")
159-
if [[ -n "$SUDO_PASSWORD" ]]; then
160-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
161-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
159+
if [[ -n "${SUDO_PASSWORD}" ]]; then
160+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
161+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
162162
else
163163
"${MAKE}" "${MAKE_FLAGS[@]}"
164164
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-bdb.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ echo "Installing anyways..."
178178
echo "*******************************"
179179

180180
MAKE_FLAGS=("install")
181-
if [[ -n "$SUDO_PASSWORD" ]]; then
182-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
181+
if [[ -n "${SUDO_PASSWORD}" ]]; then
182+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
183183
else
184184
"${MAKE}" "${MAKE_FLAGS[@]}"
185185
fi
@@ -203,17 +203,17 @@ fi
203203
} > libdb.pc
204204

205205
# Install the pc file
206-
if [[ -n "$SUDO_PASSWORD" ]]; then
207-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S cp "./libdb.pc" "${INSTX_PKGCONFIG}"
208-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S chmod u=rw,go=r "${INSTX_PKGCONFIG}/libdb.pc"
206+
if [[ -n "${SUDO_PASSWORD}" ]]; then
207+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S cp "./libdb.pc" "${INSTX_PKGCONFIG}"
208+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S chmod u=rw,go=r "${INSTX_PKGCONFIG}/libdb.pc"
209209
else
210210
cp "./libdb.pc" "${INSTX_PKGCONFIG}"
211211
chmod u=rw,go=r "${INSTX_PKGCONFIG}/libdb.pc"
212212
fi
213213

214214
# Fix permissions once
215-
if [[ -n "$SUDO_PASSWORD" ]]; then
216-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
215+
if [[ -n "${SUDO_PASSWORD}" ]]; then
216+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
217217
else
218218
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
219219
fi

build-bison-rc.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ echo "Installing package"
178178
echo "*************************"
179179

180180
MAKE_FLAGS=("install")
181-
if [[ -n "$SUDO_PASSWORD" ]]; then
182-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
183-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
184-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/copy-sources.sh" "${PWD}" "${INSTX_SRCDIR}/${BISON_DIR}"
181+
if [[ -n "${SUDO_PASSWORD}" ]]; then
182+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
183+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
184+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/copy-sources.sh" "${PWD}" "${INSTX_SRCDIR}/${BISON_DIR}"
185185
else
186186
"${MAKE}" "${MAKE_FLAGS[@]}"
187187
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-bison.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,10 @@ echo "Installing package"
205205
echo "*************************"
206206

207207
MAKE_FLAGS=("install")
208-
if [[ -n "$SUDO_PASSWORD" ]]; then
209-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
210-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
211-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/copy-sources.sh" "${PWD}" "${INSTX_SRCDIR}/${BISON_DIR}"
208+
if [[ -n "${SUDO_PASSWORD}" ]]; then
209+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
210+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
211+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/copy-sources.sh" "${PWD}" "${INSTX_SRCDIR}/${BISON_DIR}"
212212
else
213213
"${MAKE}" "${MAKE_FLAGS[@]}"
214214
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-boehm-gc-7.2k.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ echo "Installing package"
149149
echo "**********************"
150150

151151
MAKE_FLAGS=("install")
152-
if [[ -n "$SUDO_PASSWORD" ]]; then
153-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
154-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
152+
if [[ -n "${SUDO_PASSWORD}" ]]; then
153+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
154+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
155155
else
156156
"${MAKE}" "${MAKE_FLAGS[@]}"
157157
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-boehm-gc.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ echo "Installing package"
148148
echo "**********************"
149149

150150
MAKE_FLAGS=("install")
151-
if [[ -n "$SUDO_PASSWORD" ]]; then
152-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
153-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
151+
if [[ -n "${SUDO_PASSWORD}" ]]; then
152+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
153+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
154154
else
155155
"${MAKE}" "${MAKE_FLAGS[@]}"
156156
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-botan.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ echo "Installing package"
178178
echo "*************************"
179179

180180
MAKE_FLAGS=("install")
181-
if [[ -n "$SUDO_PASSWORD" ]]; then
182-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
183-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
181+
if [[ -n "${SUDO_PASSWORD}" ]]; then
182+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
183+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
184184
else
185185
"${MAKE}" "${MAKE_FLAGS[@]}"
186186
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-bzip.sh

+11-11
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,16 @@ echo "****************************"
181181
echo "Installing package"
182182
echo "****************************"
183183

184-
if [[ -n "$SUDO_PASSWORD" ]]
184+
if [[ -n "${SUDO_PASSWORD}" ]]
185185
then
186186
echo "Installing static archive..."
187187
MAKE_FLAGS=("-f" "Makefile" installdirs
188188
PREFIX="${INSTX_PREFIX}" LIBDIR="${INSTX_LIBDIR}")
189-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
189+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
190190

191191
MAKE_FLAGS=("-f" "Makefile" install
192192
PREFIX="${INSTX_PREFIX}" LIBDIR="${INSTX_LIBDIR}")
193-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
193+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
194194
else
195195
echo "Installing static archive..."
196196
MAKE_FLAGS=("-f" "Makefile" installdirs
@@ -245,16 +245,16 @@ echo "****************************"
245245
echo "Installing package"
246246
echo "****************************"
247247

248-
if [[ -n "$SUDO_PASSWORD" ]]
248+
if [[ -n "${SUDO_PASSWORD}" ]]
249249
then
250250
echo "Installing shared object..."
251251
MAKE_FLAGS=("-f" "$MAKEFILE" install
252252
PREFIX="${INSTX_PREFIX}" LIBDIR="${INSTX_LIBDIR}")
253-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
253+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
254254

255255
MAKE_FLAGS=("-f" "$MAKEFILE" installdirs
256256
PREFIX="${INSTX_PREFIX}" LIBDIR="${INSTX_LIBDIR}")
257-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
257+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
258258
else
259259
echo "Installing shared object..."
260260
MAKE_FLAGS=("-f" "$MAKEFILE" installdirs
@@ -286,18 +286,18 @@ fi
286286
echo "Cflags: -I\${includedir}"
287287
} > libbz2.pc
288288

289-
if [[ -n "$SUDO_PASSWORD" ]]
289+
if [[ -n "${SUDO_PASSWORD}" ]]
290290
then
291-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S cp ./libbz2.pc "${INSTX_PKGCONFIG}"
292-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S chmod u=rw,go=r "${INSTX_PKGCONFIG}/libbz2.pc"
291+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S cp ./libbz2.pc "${INSTX_PKGCONFIG}"
292+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S chmod u=rw,go=r "${INSTX_PKGCONFIG}/libbz2.pc"
293293
else
294294
cp ./libbz2.pc "${INSTX_PKGCONFIG}"
295295
chmod u=rw,go=r "${INSTX_PKGCONFIG}/libbz2.pc"
296296
fi
297297

298298
# Fix permissions once
299-
if [[ -n "$SUDO_PASSWORD" ]]; then
300-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
299+
if [[ -n "${SUDO_PASSWORD}" ]]; then
300+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
301301
else
302302
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
303303
fi

build-cacert.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ echo " available: ${bootstrap_cacert}"
7272
BOOTSTRAP_CACERT_FILE="${INSTX_TOPDIR}/bootstrap/cacert.pem"
7373
FIX_PERMISSIONS="${INSTX_TOPDIR}/fix-permissions.sh"
7474

75-
if [[ -n "$SUDO_PASSWORD" ]]
75+
if [[ -n "${SUDO_PASSWORD}" ]]
7676
then
77-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S mkdir -p "$INSTX_CACERT_PATH"
78-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S cp "$BOOTSTRAP_CACERT_FILE" "$INSTX_CACERT_FILE"
79-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S chmod u=rw,go=r "$INSTX_CACERT_FILE"
80-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash ${FIX_PERMISSIONS} "${INSTX_PREFIX}"
77+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S mkdir -p "$INSTX_CACERT_PATH"
78+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S cp "$BOOTSTRAP_CACERT_FILE" "$INSTX_CACERT_FILE"
79+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S chmod u=rw,go=r "$INSTX_CACERT_FILE"
80+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash ${FIX_PERMISSIONS} "${INSTX_PREFIX}"
8181
else
8282
mkdir -p "$INSTX_CACERT_PATH"
8383
cp "$BOOTSTRAP_CACERT_FILE" "$INSTX_CACERT_FILE"

build-cares.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ echo "Installing package"
179179
echo "**************************"
180180

181181
MAKE_FLAGS=("install")
182-
if [[ -n "$SUDO_PASSWORD" ]]; then
183-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
184-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
185-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/copy-sources.sh" "${PWD}" "${INSTX_SRCDIR}/${CARES_DIR}"
182+
if [[ -n "${SUDO_PASSWORD}" ]]; then
183+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
184+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
185+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/copy-sources.sh" "${PWD}" "${INSTX_SRCDIR}/${CARES_DIR}"
186186
else
187187
"${MAKE}" "${MAKE_FLAGS[@]}"
188188
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-clamav.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ echo "Installing package"
180180
echo "**************************"
181181

182182
MAKE_FLAGS=("install")
183-
if [[ -n "$SUDO_PASSWORD" ]]; then
184-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
185-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
183+
if [[ -n "${SUDO_PASSWORD}" ]]; then
184+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
185+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
186186
else
187187
"${MAKE}" "${MAKE_FLAGS[@]}"
188188
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-cmake-3.0.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ echo "Installing package"
153153
echo "*************************"
154154

155155
MAKE_FLAGS=("install")
156-
if [[ -n "$SUDO_PASSWORD" ]]; then
157-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
158-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
156+
if [[ -n "${SUDO_PASSWORD}" ]]; then
157+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
158+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
159159
else
160160
"${MAKE}" "${MAKE_FLAGS[@]}"
161161
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

build-cmake.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ echo "Installing package"
153153
echo "*************************"
154154

155155
MAKE_FLAGS=("install")
156-
if [[ -n "$SUDO_PASSWORD" ]]; then
157-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
158-
printf "%s\n" "$SUDO_PASSWORD" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
156+
if [[ -n "${SUDO_PASSWORD}" ]]; then
157+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S "${MAKE}" "${MAKE_FLAGS[@]}"
158+
printf "%s\n" "${SUDO_PASSWORD}" | sudo ${SUDO_ENV_OPT} -S bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"
159159
else
160160
"${MAKE}" "${MAKE_FLAGS[@]}"
161161
bash "${INSTX_TOPDIR}/fix-permissions.sh" "${INSTX_PREFIX}"

0 commit comments

Comments
 (0)