From 80779c9f2d37e3a4bbd1acc081e69bc47bd597c4 Mon Sep 17 00:00:00 2001 From: bryan Date: Fri, 17 Feb 2023 11:28:12 -0500 Subject: [PATCH] Skip dependency check for lockfile --- .gitignore | 3 ++- openwrtbuilder | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1540917..8347bf6 100755 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ src/ -bin/ \ No newline at end of file +bin/ +.dependencies \ No newline at end of file diff --git a/openwrtbuilder b/openwrtbuilder index 750d168..20d1430 100755 --- a/openwrtbuilder +++ b/openwrtbuilder @@ -205,6 +205,7 @@ installDependencies() { debug "${FUNCNAME[0]}" declare -a pkg_list + declare lock_file="$BUILDROOT/.dependencies" # TODO please contribute your platform here if (( FROM_SOURCE )); then @@ -349,7 +350,11 @@ installDependencies() { esac fi - pkg_install "${pkg_list[@]}" + # Skip dependency installation if lock file is present + [[ -f $lock_file ]] && return + + pkg_install "${pkg_list[@]}" && echo "${pkg_list[@]}" > "$lock_file" + }