summaryrefslogtreecommitdiff
path: root/src/abslibre-tools/libredbdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/abslibre-tools/libredbdiff')
-rwxr-xr-xsrc/abslibre-tools/libredbdiff22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/abslibre-tools/libredbdiff b/src/abslibre-tools/libredbdiff
index fdec43a..074d8fe 100755
--- a/src/abslibre-tools/libredbdiff
+++ b/src/abslibre-tools/libredbdiff
@@ -51,16 +51,12 @@ enablerepo() {
sed -i "\/\[$repo\]/,+1 s/#Include/Include/" "$conffile_arg"
}
-# Globals:
-# - init
createdir() {
local dir=$1
if ! [[ -d "$dir" ]] ; then
msg "Creating directory %q" "$dir"
mkdir -- "$dir" || die "Failed to create directory %q. Exiting." "$dir"
- elif $init; then
- warning "%q already exists. Skipping." "$dir"
fi
}
@@ -269,23 +265,7 @@ main_update() {
fi
check_vars libredbdiff statedir mirror_prbl mirror_arch || exit 1
- local init=false
- if ! [[ -e "$conffile_prbl" && \
- -e "$conffile_arch" && \
- -e "$mirrorlist_prbl" && \
- -e "$mirrorlist_arch" ]]; then
- warning "At least one %s configuration file is missing." \
- "$name"
- msg "Downloading and preparing missing configuration files."
- initialize
- init=true
- fi
-
- if ! [[ -d "$dbpath_prbl" && \
- -d "$dbpath_arch" ]]; then
- warning "At least one %s pacman DB directory is missing. Synchronizing %s DB files." \
- "$name" "$name"
- fi
+ initialize
createdir "$dbpath_prbl"
msg "Synchronizing %s pacman databases for %s" "$name" "Parabola"