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" + }