dep

Package manager for embedded C libraries
git clone git://git.finwo.net/app/dep
Log | Files | Refs | README | LICENSE

commit c071037d1ea370a0760544acf5397fc1cc1b11e0
parent 4b02cc7d02108247227ad3fb0876514d70e51fb6
Author: finwo <finwo@pm.me>
Date:   Tue, 17 Oct 2023 23:57:39 +0200

Added debug statements to all curl calls

Diffstat:
MMakefile | 6+-----
Mdist/dep | 4++++
Msrc/command/install/index.sh | 4++++
3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile @@ -7,7 +7,7 @@ PREPROCESS=preprocess --substitute DESTDIR?=/usr/local TARGET=dep -default: dist/$(TARGET) dist/action.js README.md +default: dist/$(TARGET) README.md dist/$(TARGET): $(SRC) mkdir -p $(shell dirname $@) @@ -15,10 +15,6 @@ dist/$(TARGET): $(SRC) $(PREPROCESS) -D __NAME=$(TARGET) -I src src/main.sh | tee -a $@ > /dev/null chmod +x "$@" -dist/action.js: src/action.js - mkdir -p $(shell dirname $@) - npx esbuild $< --platform=node --bundle --outfile=$@ - .PHONY: install install: dist/$(TARGET) install "dist/$(TARGET)" "$(DESTDIR)/bin" diff --git a/dist/dep b/dist/dep @@ -311,12 +311,14 @@ function cmd_install_dep { case "${origin##*.}" in ini) # Download the package.ini for the dependency + echo "pre-ini download" curl --location --progress-bar "${origin}" --output "${CMD_INSTALL_PKG_DEST}/${name}/package.ini" ;; *) # Download the assumed tarball mkdir -p "${CMD_INSTALL_PKG_DEST}/.dep/cache/${name}" if [ ! -f "${CMD_INSTALL_PKG_DEST}/.dep/cache/${name}/tarball-pkg" ]; then + echo "pre-tarball download A" curl --location --progress-bar "${origin}" --output "${CMD_INSTALL_PKG_DEST}/.dep/cache/${name}/tarball-pkg" fi # Extract tarball @@ -331,6 +333,7 @@ function cmd_install_dep { # Download mkdir -p "${CMD_INSTALL_PKG_DEST}/.dep/cache/${name}" if [ ! -f "${CMD_INSTALL_PKG_DEST}/.dep/cache/${name}/tarball-src" ]; then + echo "pre-tarball download B" curl --location --progress-bar "${SRC}" --output "${CMD_INSTALL_PKG_DEST}/.dep/cache/${name}/tarball-src" fi @@ -353,6 +356,7 @@ function cmd_install_dep { # Download the extra file into cache if [ ! -f "${CMD_INSTALL_PKG_DEST}/.dep/cache/${name}/fetch/${filename}" ]; then + echo "pre-fetch" curl --location --progress-bar "${filesource}" --create-dirs --output "${CMD_INSTALL_PKG_DEST}/.dep/cache/${name}/fetch/${filename}" fi diff --git a/src/command/install/index.sh b/src/command/install/index.sh @@ -82,12 +82,14 @@ function cmd_install_dep { case "${origin##*.}" in ini) # Download the package.ini for the dependency + echo "pre-ini download" curl --location --progress-bar "${origin}" --output "${CMD_INSTALL_PKG_DEST}/${name}/package.ini" ;; *) # Download the assumed tarball mkdir -p "${CMD_INSTALL_PKG_DEST}/.__NAME/cache/${name}" if [ ! -f "${CMD_INSTALL_PKG_DEST}/.__NAME/cache/${name}/tarball-pkg" ]; then + echo "pre-tarball download A" curl --location --progress-bar "${origin}" --output "${CMD_INSTALL_PKG_DEST}/.__NAME/cache/${name}/tarball-pkg" fi # Extract tarball @@ -102,6 +104,7 @@ function cmd_install_dep { # Download mkdir -p "${CMD_INSTALL_PKG_DEST}/.__NAME/cache/${name}" if [ ! -f "${CMD_INSTALL_PKG_DEST}/.__NAME/cache/${name}/tarball-src" ]; then + echo "pre-tarball download B" curl --location --progress-bar "${SRC}" --output "${CMD_INSTALL_PKG_DEST}/.__NAME/cache/${name}/tarball-src" fi @@ -124,6 +127,7 @@ function cmd_install_dep { # Download the extra file into cache if [ ! -f "${CMD_INSTALL_PKG_DEST}/.__NAME/cache/${name}/fetch/${filename}" ]; then + echo "pre-fetch" curl --location --progress-bar "${filesource}" --create-dirs --output "${CMD_INSTALL_PKG_DEST}/.__NAME/cache/${name}/fetch/${filename}" fi