Skip to content

Commit

Permalink
Fix local repo handling bug
Browse files Browse the repository at this point in the history
Remove useless code and fix a bug that prevented local repo symlinks to be created.
  • Loading branch information
dtmateojr authored Dec 4, 2018
1 parent c0021a3 commit c38fc2e
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions dtmrepo
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,6 @@ update_repo() {
_LOCKFILE="${LOCKDIR}/${_DISTRO}-${_REPODIR}.lock"
_DESTDIR="${rootdir}/${_DISTRO}/${_REPODIR}"

if [ ! -d "${_DESTDIR}" ]; then
mkdir -p "${_DESTDIR}" &> /dev/null
if [ "$?" -ne 0 ]; then
echo "Error creating package repository ${_DESTDIR}."
return 1
fi
fi

if [ "${_REPOID:0:${#LOCALMARKER}}" == "${LOCALMARKER}" ]; then
_SOURCEDIR=${_REPOID#${LOCALMARKER}}
if [ ! -L "${_DESTDIR}" ]; then
Expand Down Expand Up @@ -355,14 +347,6 @@ download_package() {
_LOCKFILE="${LOCKDIR}/${_DISTRO}-${_REPODIR}.lock"
_DESTDIR="${rootdir}/${_DISTRO}/${_REPODIR}"

if [ ! -d "${_DESTDIR}" ]; then
mkdir -p "${_DESTDIR}" &> /dev/null
if [ "$?" -ne 0 ]; then
echo "Error creating package repository ${_DESTDIR}."
return 1
fi
fi

if [ "${_REPOID:0:${#LOCALMARKER}}" == "${LOCALMARKER}" ]; then
[ "${VERBOSE}" -eq 1 ] && echo "Package select option not applicable to local repos."
return 1
Expand Down

0 comments on commit c38fc2e

Please sign in to comment.