Skip to content

Commit

Permalink
www-apps/baikal: use relative symlink to config
Browse files Browse the repository at this point in the history
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Fabian Groffen <[email protected]>
  • Loading branch information
grobian committed Jan 7, 2021
1 parent 9c4d0cc commit 280c4f8
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions www-apps/baikal/baikal-0.7.2.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI="7"
Expand Down Expand Up @@ -34,15 +34,19 @@ src_install() {
einfo "Setting up container for configuration"
dodir /etc/${PN}

einfo "Fixing symlinks"
local link target
find "${D}${MY_HTDOCSDIR}" -type l | while read link ; do
target=$(readlink "${link}")
target=${target/..\/Core/Core}
rm "${link}" && ln -s "${target}" "${link}"
# setup config in /etc
# we are not allowed to use straight-forward absolute symlink :(
local root path htdocsdir=${MY_HTDOCSDIR%/}
while [[ -n ${htdocsdir} ]] ; do
root+="../"
htdocsdir=${htdocsdir%/*}
# trim duplicate slashes
while [[ ${htdocsdir} == */ ]] ; do
htdocsdir=${htdocsdir%/}
done
done
dosym /etc/${PN} "${MY_HTDOCSDIR}"/Specific
dosym /etc/${PN} "${MY_HTDOCSDIR}"/config
dosym ${root%/}/etc/${PN} "${MY_HTDOCSDIR}"/Specific
dosym ${root%/}/etc/${PN} "${MY_HTDOCSDIR}"/config
dosym . "${MY_HTDOCSDIR}"/html

webapp_postinst_txt en "${FILESDIR}/postinstall-v0.7-en.txt"
Expand Down

0 comments on commit 280c4f8

Please sign in to comment.