Update cache only when needed
This commit is contained in:
parent
5b31e8f60f
commit
7769565a21
2 changed files with 14 additions and 12 deletions
|
@ -12,11 +12,14 @@ validate_input_packages() {
|
||||||
log user "Invalid package: $package (contains invalid characters)"
|
log user "Invalid package: $package (contains invalid characters)"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
update_package_cache
|
||||||
|
|
||||||
if grep -qw "$package" "$PACKAGE_CACHE"; then
|
if grep -qw "$package" "$PACKAGE_CACHE"; then
|
||||||
log debug "Found in package cache: $package"
|
log debug "Found in package cache: $package"
|
||||||
else
|
else
|
||||||
log user "Invalid package: $package (not found in package cache)"
|
log user "Invalid package: $package (not found in package cache)"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
1
tori
1
tori
|
@ -34,7 +34,6 @@ main() {
|
||||||
|
|
||||||
# startup checks
|
# startup checks
|
||||||
prepare_directories
|
prepare_directories
|
||||||
update_package_cache
|
|
||||||
|
|
||||||
# entry point
|
# entry point
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue