aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functions19
1 files changed, 18 insertions, 1 deletions
diff --git a/functions b/functions
index dae66bc..e5a6caf 100644
--- a/functions
+++ b/functions
@@ -71,6 +71,22 @@ function set_hdlists_needupdate()
touch "$hdlistsdir/$distrorelease-$section-$sectionrepo"
}
+function get_hdlists_needupdate()
+{
+ local distrorelease="$1"
+ local section="$2"
+ local sectionrepo="$3"
+ test -f "$hdlistsdir/$distrorelease-$section-$sectionrepo"
+}
+
+function rm_hdlists_needupdate()
+{
+ local distrorelease="$1"
+ local section="$2"
+ local sectionrepo="$3"
+ rm -f "$hdlistsdir/$distrorelease-$section-$sectionrepo"
+}
+
function update_hdlists_if_needed()
{
for distrorelease in $distroreleases
@@ -79,8 +95,9 @@ function update_hdlists_if_needed()
do
for sectionrepo in $sectionsrepos
do
- if [ -f "$hdlistsdir/$distrorelease-$section-$sectionrepo" ]
+ if get_hdlists_needupdate "$distrorelease" "$section" "$sectionrepo"
then
+ rm_hdlists_needupdate "$distrorelease" "$section" "$sectionrepo"
update_hdlists "$distrorelease" "$section" "$sectionrepo"
fi
done