Skip to content

Commit

Permalink
Make downloads with curl silent in build process
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Nov 2, 2024
1 parent b7c7540 commit 60ed299
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autotools-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
- name: Install Macports
run: |
curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci; source ./macports-ci install
curl -sSLO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci; source ./macports-ci install
# --remove-brew does not remove the Homebrew entries in bin,
# so remove them now.
rm -v $(brew --prefix)/bin/*
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cmake-win64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ jobs:
- name: Display Tesseract Version and Test Command Line Usage
shell: cmd
run: |
curl -L https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata --output ${{env.ILOC}}/share/tessdata/eng.traineddata
curl -L https://github.com/tesseract-ocr/tessdata/raw/main/osd.traineddata --output ${{env.ILOC}}/share/tessdata/osd.traineddata
curl -sSL https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata --output ${{env.ILOC}}/share/tessdata/eng.traineddata
curl -sSL https://github.com/tesseract-ocr/tessdata/raw/main/osd.traineddata --output ${{env.ILOC}}/share/tessdata/osd.traineddata
echo "Setting TESSDATA_PREFIX..."
set TESSDATA_PREFIX=${{env.ILOC}}/share/tessdata
echo "Setting PATH..."
Expand Down
2 changes: 1 addition & 1 deletion nsis/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ gitrev="$(shell git --git-dir=${abs_top_srcdir}/.git --work-tree=${abs_top_srcdi
.PHONY: winsetup

Plugins/x86-unicode/INetC.dll:
curl -O https://nsis.sourceforge.io/mediawiki/images/c/c9/Inetc.zip
curl -OsS https://nsis.sourceforge.io/mediawiki/images/c/c9/Inetc.zip
unzip Inetc.zip $@

winpath.exe: winpath.cpp
Expand Down
17 changes: 5 additions & 12 deletions nsis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,16 @@ sudo apt-get install --assume-yes --no-install-recommends --quiet \
mingw-w64-tools nsis g++-"$PKG_ARCH" \
makepkg pacman-package-manager

# Install pacman-package-manager and its dependencies (from Ubuntu 22.10).
# sudo curl -Os http://de.archive.ubuntu.com/ubuntu/pool/universe/p/pacman-package-manager/pacman-package-manager_6.0.1-4_amd64.deb
# sudo curl -Os http://de.archive.ubuntu.com/ubuntu/pool/universe/p/pacman-package-manager/libalpm13_6.0.1-4_amd64.deb
# sudo curl -Os http://de.archive.ubuntu.com/ubuntu/pool/universe/p/pacman-package-manager/makepkg_6.0.1-4_amd64.deb
# sudo dpkg -i *.deb || true
# sudo apt-get install --fix-broken --assume-yes --no-install-recommends --quiet

# Configure pacman.

# Enable mirrorlist.
sudo sed -Ei 's/^#.*(Include.*mirrorlist)/\1/' /etc/pacman.conf
(
# Add msys key for pacman.
cd /usr/share/keyrings
sudo curl -Os https://raw.githubusercontent.com/msys2/MSYS2-keyring/master/msys2.gpg
sudo curl -Os https://raw.githubusercontent.com/msys2/MSYS2-keyring/master/msys2-revoked
sudo curl -Os https://raw.githubusercontent.com/msys2/MSYS2-keyring/master/msys2-trusted
sudo curl -OsS https://raw.githubusercontent.com/msys2/MSYS2-keyring/master/msys2.gpg
sudo curl -OsS https://raw.githubusercontent.com/msys2/MSYS2-keyring/master/msys2-revoked
sudo curl -OsS https://raw.githubusercontent.com/msys2/MSYS2-keyring/master/msys2-trusted
)
(
# Add active environments for pacman.
Expand All @@ -60,8 +53,8 @@ cat <<eod | sudo tee mirrorlist >/dev/null
[mingw64]
Include = /etc/pacman.d/mirrorlist.mingw
eod
sudo curl -O https://raw.githubusercontent.com/msys2/MSYS2-packages/master/pacman-mirrors/mirrorlist.mingw
# sudo curl -O https://raw.githubusercontent.com/msys2/MSYS2-packages/master/pacman-mirrors/mirrorlist.msys
sudo curl -OsS https://raw.githubusercontent.com/msys2/MSYS2-packages/master/pacman-mirrors/mirrorlist.mingw
# sudo curl -OsS https://raw.githubusercontent.com/msys2/MSYS2-packages/master/pacman-mirrors/mirrorlist.msys
)

sudo pacman-key --init
Expand Down
2 changes: 1 addition & 1 deletion unittest/fuzzers/oss-fuzz-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ mkdir -p "$OUT"/tessdata
(
cd "$OUT"/tessdata
test -f eng.traineddata || \
curl -L -O https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata
curl -sSL -O https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata
)

# OSS-Fuzz requires static linking for the project specific libraries,
Expand Down

0 comments on commit 60ed299

Please sign in to comment.