Commit ec715e89 authored by Matheus Horstmann's avatar Matheus Horstmann 🐴

Issue #4: Verify before coping

Signed-off-by: Matheus Horstmann's avatarMatheus Horstmann <mch15@inf.ufpr.br>
parent 7672e47b
Pipeline #22314 passed with stages
in 7 minutes and 43 seconds
le-proinfodata (1.1.3) unstable; urgency=medium
* Fix preinst that requires a second apt install command
-- Matheus Horstmann <lesuporte@c3sl.ufpr.br> Tue, 11 Nov 2019 10:00:00 -0300
le-proinfodata (1.1.2) unstable; urgency=medium
* Increase version to fix checksum
......
......@@ -50,22 +50,22 @@ if test -f "${CONF}/inep" -a ! -f "${BKP_CONF}/inep"; then
# existence always means the other ones also exist
for FILE in "proxy" "inep"; do
if test -f "${BKPCONF}/${FILE}"; then
cp -af "${BKPCONF}/${FILE}" "${BKP_BKPCONF}/${FILE}"
[[ -e "${BKPCONF}/${FILE}" ]] && cp -af "${BKPCONF}/${FILE}" "${BKP_BKPCONF}/${FILE}"
else
cp -af "${CONF}/${FILE}" "${BKP_BKPCONF}/${FILE}"
[[ -e "${CONF}/${FILE}" ]] && cp -af "${CONF}/${FILE}" "${BKP_BKPCONF}/${FILE}"
fi
if test -f "${MD5CONF}/${FILE}"; then
cp -af "${MD5CONF}/${FILE}" "${BKP_MD5CONF}/${FILE}"
[[ -e "${MD5CONF}/${FILE}" ]] && cp -af "${MD5CONF}/${FILE}" "${BKP_MD5CONF}/${FILE}"
else
md5sum "${CONF}/${FILE}" | cut -d' ' -f1 > "${BKP_MD5CONF}/${FILE}"
fi
if test -f "${MD5BKPCONF}/${FILE}"; then
cp -af "${MD5BKPCONF}/${FILE}" "${BKP_MD5BKPCONF}/${FILE}"
[[ -e "${MD5BKPCONF}/${FILE}" ]] && cp -af "${MD5BKPCONF}/${FILE}" "${BKP_MD5BKPCONF}/${FILE}"
else
md5sum "${CONF}/${FILE}" | cut -d' ' -f1 > \
md5sum "${CONF}/${FILE}" | cut -d' ' -f1 > \
"${BKP_MD5BKPCONF}/${FILE}"
fi
cp -af "${CONF}/${FILE}" "${BKP_CONF}/${FILE}"
[[ -e "${CONF}/${FILE}" ]] && cp -af "${CONF}/${FILE}" "${BKP_CONF}/${FILE}"
done
fi
......
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