File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,15 @@ _installCommon() {
3636 pip3 install --no-cache-dir --user -U $pkgs
3737 fi
3838
39- baseDir=$( mktemp -d /tmp/DependencyInstaller-orfs-XXXXXX)
39+ if [[ " $constantBuildDir " == " true" ]]; then
40+ baseDir=" /tmp/DependencyInstaller-ORFS"
41+ if [[ -d " $baseDir " ]]; then
42+ echo " [INFO] Removing old building directory $baseDir "
43+ fi
44+ mkdir -p " $baseDir "
45+ else
46+ baseDir=$( mktemp -d /tmp/DependencyInstaller-orfs-XXXXXX)
47+ fi
4048
4149 # Install Verilator
4250 verilatorPrefix=` realpath ${PREFIX:- " /usr/local" } `
@@ -239,6 +247,9 @@ Usage: $0
239247 # sudo or with root access.
240248 $0 -ci
241249 # Installs CI tools
250+ $0 -constant-build-dir
251+ # Use constant build directory, instead of
252+ # random one.
242253EOF
243254 exit " ${1:- 1} "
244255}
@@ -251,6 +262,7 @@ PREFIX=""
251262option=" all"
252263# default isLocal
253264isLocal=" false"
265+ constantBuildDir=" false"
254266CI=" no"
255267
256268# default values, can be overwritten by cmdline args
@@ -283,6 +295,10 @@ while [ "$#" -gt 0 ]; do
283295 OR_INSTALLER_ARGS=" ${OR_INSTALLER_ARGS} $1 "
284296 PREFIX=${1#* =}
285297 ;;
298+ -constant-build-dir)
299+ OR_INSTALLER_ARGS=" ${OR_INSTALLER_ARGS} $1 "
300+ constantBuildDir=" true"
301+ ;;
286302 * )
287303 echo " unknown option: ${1} " >&2
288304 _help
You can’t perform that action at this time.
0 commit comments