Skip to content

Commit bc2d953

Browse files
author
Vitor Bandeira
committed
etc: format DependencyInstaller
Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
1 parent 1854d9f commit bc2d953

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

etc/DependencyInstaller.sh

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ _installCommonDev() {
115115

116116
# Check if pcre2 is installed
117117
if [[ -z $(pcre2-config --version) ]]; then
118-
tarName="pcre2-${pcreVersion}.tar.gz"
119-
wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${pcreVersion}/${tarName}
120-
md5sum -c <(echo "${pcreChecksum} ${tarName}") || exit 1
121-
./Tools/pcre-build.sh
118+
tarName="pcre2-${pcreVersion}.tar.gz"
119+
wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${pcreVersion}/${tarName}
120+
md5sum -c <(echo "${pcreChecksum} ${tarName}") || exit 1
121+
./Tools/pcre-build.sh
122122
fi
123123
./autogen.sh
124124
./configure --prefix=${swigPrefix}
@@ -243,8 +243,8 @@ _installCommonDev() {
243243
rm -rf "${baseDir}"
244244

245245
if [[ ! -z ${PREFIX} ]]; then
246-
# Emit an environment setup script
247-
cat > ${PREFIX}/env.sh <<EOF
246+
# Emit an environment setup script
247+
cat > ${PREFIX}/env.sh <<EOF
248248
depRoot="\$(dirname \$(readlink -f "\${BASH_SOURCE[0]}"))"
249249
PATH=\${depRoot}/bin:\${PATH}
250250
LD_LIBRARY_PATH=\${depRoot}/lib64:\${depRoot}/lib:\${LD_LIBRARY_PATH}
@@ -334,7 +334,7 @@ _installUbuntuPackages() {
334334
tcllib \
335335
wget \
336336
zlib1g-dev \
337-
ccache \
337+
ccache
338338

339339
packages=()
340340
# Chose Python version
@@ -422,8 +422,8 @@ _installRHELPackages() {
422422
http://repo.okay.com.mx/centos/8/x86_64/release/bison-3.0.4-10.el8.x86_64.rpm \
423423
https://forensics.cert.org/centos/cert/7/x86_64/flex-2.6.1-9.el7.x86_64.rpm
424424

425-
wget https://github.com/jgm/pandoc/releases/download/${version}/pandoc-${version}-linux-${arch}.tar.gz &&\
426-
tar xvzf pandoc-${version}-linux-${arch}.tar.gz --strip-components 1 -C /usr/local/ &&\
425+
wget https://github.com/jgm/pandoc/releases/download/${version}/pandoc-${version}-linux-${arch}.tar.gz
426+
tar xvzf pandoc-${version}-linux-${arch}.tar.gz --strip-components 1 -C /usr/local/
427427
rm -rf pandoc-${version}-linux-${arch}.tar.gz
428428
}
429429

@@ -478,7 +478,7 @@ _installCentosPackages() {
478478
wget \
479479
ccache \
480480
zlib-devel
481-
}
481+
}
482482

483483
_installOpenSuseCleanUp() {
484484
zypper -n clean --all
@@ -522,6 +522,7 @@ _installOpenSusePackages() {
522522
tcllib \
523523
wget \
524524
zlib-devel
525+
525526
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 50
526527
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 50
527528
}
@@ -551,18 +552,18 @@ _installHomebrewPackage() {
551552

552553
_installDarwin() {
553554
if ! command -v brew &> /dev/null; then
554-
echo "Homebrew is not found. Please install homebrew before continuing."
555-
exit 1
556-
fi
555+
echo "Homebrew is not found. Please install homebrew before continuing."
556+
exit 1
557+
fi
557558
if ! xcode-select -p &> /dev/null; then
558-
# xcode-select does not pause execution, so the user must handle it
559-
cat <<EOF
559+
# xcode-select does not pause execution, so the user must handle it
560+
cat <<EOF
560561
Xcode command line tools not installed.
561562
Run the following command to install them:
562563
xcode-select --install
563564
Then, rerun this script.
564565
EOF
565-
exit 1
566+
exit 1
566567
fi
567568
brew install bison boost cmake eigen flex fmt groff libomp or-tools pandoc pyqt5 python spdlog tcl-tk zlib
568569

@@ -619,6 +620,7 @@ _installDebianPackages() {
619620
apt-get install -y --no-install-recommends \
620621
libpython3.7 \
621622
qt5-default
623+
622624
else
623625
apt-get install -y --no-install-recommends \
624626
libpython3.8 \
@@ -644,6 +646,7 @@ _installCI() {
644646
install -m 0755 -d /etc/apt/keyrings
645647
curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
646648
-o /etc/apt/keyrings/docker.asc
649+
647650
chmod a+r /etc/apt/keyrings/docker.asc
648651

649652
# Add the repository to Apt sources:

0 commit comments

Comments
 (0)