Commit 655c4aa8 authored by Bernhard Landauer's avatar Bernhard Landauer

adjust remove_local_pkg()

parent 45a3af1f
......@@ -216,14 +216,15 @@ img_upload() {
remove_local_pkg() {
# remove local packages if remote packages exists, eg, if upload worked
for p in $PACKAGE
do
if ssh $SERVER "[ -f /opt/repo/mirror/stable/$ARCH/$REPO/$p ]"; then
msg "Removing local file [$p]..."
rm ./"$p"*
else
info "Package did not get uploaded correctly! Files not removed..."
fi
for p in ${PACKAGE[@]}; do
pkg=$(find_pkg $p)
pkg_file=${pkg##*/}
if ssh $SERVER "[ -f /opt/repo/mirror/stable/$ARCH/$REPO/$pkg_file ]"; then
msg "Removing local file [$p]..."
rm $pkg{,.sig}
else
info "Package did not get uploaded correctly! Files not removed..."
fi
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