Make sure source file exists

This commit is contained in:
Renato Botelho 2016-04-05 22:13:38 -03:00
parent 967794d2f4
commit 75cdfae39b

View File

@ -736,13 +736,16 @@ if [ -z "${pkg_repo_conf_path}" -o ! -f "${pkg_repo_conf_path}" ]; then
pkg_repo_conf_path=${default_pkg_repo_conf_path}
fi
if [ -e "${pkg_repo_conf}" -a ! -L "${pkg_repo_conf}" ]; then
if [ -f "${pkg_repo_conf_path}" -a -e "${pkg_repo_conf}" -a \
! -L "${pkg_repo_conf}" ]; then
rm -f ${pkg_repo_conf}
ln -sf ${pkg_repo_conf_path} ${pkg_repo_conf}
fi
if [ "$(readlink ${pkg_repo_conf})" != "${pkg_repo_conf_path}" ]; then
ln -sf ${pkg_repo_conf_path} ${pkg_repo_conf}
if [ -f "${pkg_repo_conf_path}" ]; then
if [ "$(readlink ${pkg_repo_conf})" != "${pkg_repo_conf_path}" ]; then
ln -sf ${pkg_repo_conf_path} ${pkg_repo_conf}
fi
fi
# Flags used in _exit