Skip to content

Commit 79e9702

Browse files
authored
Merge pull request #2786 from vvbandeira/dep-no-arg
DependencyInstaller.sh defaults to no option
2 parents 1a0bb44 + 126826e commit 79e9702

File tree

4 files changed

+27
-11
lines changed

4 files changed

+27
-11
lines changed

docker/Dockerfile.dev

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ COPY InstallerOpenROAD.sh \
1515
ARG options=""
1616
ARG constantBuildDir="-constant-build-dir"
1717

18-
RUN env CFLAGS="-D__TIME__=0 -D__DATE__=0 -D__TIMESTAMP__=0 -Wno-builtin-macro-redefined" \
19-
CXXFLAGS="-D__TIME__=0 -D__DATE__=0 -D__TIMESTAMP__=0 -Wno-builtin-macro-redefined" \
20-
./DependencyInstaller.sh $options $constantBuildDir \
21-
&& rm -rf /tmp/installer /tmp/* /var/tmp/* /var/lib/apt/lists/*
18+
ENV CFLAGS="-D__TIME__=0 -D__DATE__=0 -D__TIMESTAMP__=0 -Wno-builtin-macro-redefined"
19+
ENV CXXFLAGS="-D__TIME__=0 -D__DATE__=0 -D__TIMESTAMP__=0 -Wno-builtin-macro-redefined"
20+
21+
RUN ./DependencyInstaller.sh -base $options $constantBuildDir \
22+
&& ./DependencyInstaller.sh -common $options $constantBuildDir \
23+
&& rm -rf /tmp/installer /tmp/* /var/tmp/* /var/lib/apt/lists/*
2224

2325
ARG fromImage
2426

etc/DependencyInstaller.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ OR_INSTALLER_ARGS="-eqy"
260260
# default prefix
261261
PREFIX=""
262262
# default option
263-
option="all"
263+
option="none"
264264
# default isLocal
265265
isLocal="false"
266266
constantBuildDir="false"
@@ -272,19 +272,25 @@ while [ "$#" -gt 0 ]; do
272272
-h|-help)
273273
_help 0
274274
;;
275+
-all)
276+
if [[ "${option}" != "none" ]]; then
277+
echo "WARNING: previous argument -${option} will be overwritten with -all." >&2
278+
fi
279+
option="all"
280+
;;
275281
-base)
276-
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} -base"
277-
if [[ "${option}" != "all" ]]; then
282+
if [[ "${option}" != "none" ]]; then
278283
echo "WARNING: previous argument -${option} will be overwritten with -base." >&2
279284
fi
280285
option="base"
286+
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} -${option}"
281287
;;
282288
-common)
283-
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} -common"
284-
if [[ "${option}" != "all" ]]; then
289+
if [[ "${option}" != "none" ]]; then
285290
echo "WARNING: previous argument -${option} will be overwritten with -common." >&2
286291
fi
287292
option="common"
293+
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} -${option}"
288294
;;
289295
-local)
290296
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} -local"
@@ -309,6 +315,13 @@ while [ "$#" -gt 0 ]; do
309315
shift 1
310316
done
311317

318+
if [[ "${option}" == "none" ]]; then
319+
echo "You must use one of: -all|-base|-common" >&2
320+
_help
321+
fi
322+
323+
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} -${option}"
324+
312325
platform="$(uname -s)"
313326
case "${platform}" in
314327
"Linux" )

tools/AutoTuner/kubernetes/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ RUN sudo apt-get update -y \
99
&& rm ./klayout_0.27.1-1_amd64.deb
1010

1111
RUN wget https://raw.githubusercontent.com/The-OpenROAD-Project/OpenROAD/master/etc/DependencyInstaller.sh \
12-
&& sudo bash ./DependencyInstaller.sh -dev \
12+
&& sudo bash ./DependencyInstaller.sh -base \
13+
&& sudo bash ./DependencyInstaller.sh -common \
1314
&& rm DependencyInstaller.sh

0 commit comments

Comments
 (0)