Commit 96f407d9 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-reposave: fix bug with repo settings

parent b6d747ba
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
load_helper epm-sh-altlinux load_helper epm-sh-altlinux
SAVELISTDIR=/tmp/eepm-etc-apt SAVELISTDIR=/tmp/eepm-etc-save
__save_alt_repo_lists() __save_alt_repo_lists()
{ {
info "Creating copy of all sources lists to $SAVELISTDIR ..." info "Creating copy of all sources lists to $SAVELISTDIR ..."
...@@ -44,8 +44,11 @@ __restore_alt_repo_lists() ...@@ -44,8 +44,11 @@ __restore_alt_repo_lists()
[ -s "$i" ] || continue [ -s "$i" ] || continue
local DD="$(echo "$i" | sed -e "s|/etc|$SAVELISTDIR|")" local DD="$(echo "$i" | sed -e "s|/etc|$SAVELISTDIR|")"
# restore only if there are differences # restore only if there are differences
diff -q "$DD" "$i" >/dev/null || continue if diff -q "$DD" "$i" >/dev/null ; then
rm -f $verbose "$DD"
else
mv $verbose "$DD" "$i" || warning "Can't restore $i file" mv $verbose "$DD" "$i" || warning "Can't restore $i file"
fi
done done
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment