summaryrefslogtreecommitdiff
path: root/src/abslibre-tools
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-05-03 01:17:05 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-05-03 01:40:49 -0400
commit98e694e9677227a41e0a96fc70a502891acfdfe2 (patch)
tree6713e22af444222258d7feacae499c72b68a40bc /src/abslibre-tools
parent26bf98d537efd0857fbf737eb42d224e171e8211 (diff)
libredbdiff: get rid of stupid warnings, just take care of it
Diffstat (limited to 'src/abslibre-tools')
-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"