summaryrefslogtreecommitdiff
path: root/profiles/common
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2019-09-27 00:27:12 +0100
committerBertrand Jacquin <bertrand@jacquin.bzh>2019-09-27 00:29:36 +0100
commit4f93b4b8c1c723c6e4e374c6a10f952355c45ec4 (patch)
tree407689bc2ac10c2bb922bb43f79c15c8e5b1554a /profiles/common
parentt,p (diff)
downloadportage-4f93b4b8c1c723c6e4e374c6a10f952355c45ec4.tar.xz
profiles/common: install own symlinks as symlinks
Diffstat (limited to 'profiles/common')
-rw-r--r--profiles/common/profile.bashrc18
1 files changed, 12 insertions, 6 deletions
diff --git a/profiles/common/profile.bashrc b/profiles/common/profile.bashrc
index 461440c2..2726dc9c 100644
--- a/profiles/common/profile.bashrc
+++ b/profiles/common/profile.bashrc
@@ -262,13 +262,19 @@ function __install_own_file () {
fi
einfo "Install ${REPLY} from factory-default"
- install -D -m 0644 \
- "${_FACTORY_DIRECTORY}/${REPLY}" \
- "${_ed}/${REPLY}" \
- || die
+ if [[ -f "${_FACTORY_DIRECTORY}/${REPLY}" ]] ; then
+ install -D -m 0644 \
+ "${_FACTORY_DIRECTORY}/${REPLY}" \
+ "${_ed}/${REPLY}" \
+ || die
- chmod --reference="${_FACTORY_DIRECTORY}/${REPLY}" "${_ed}/${REPLY}" \
- || die
+ chmod --reference="${_FACTORY_DIRECTORY}/${REPLY}" "${_ed}/${REPLY}" \
+ || die
+ elif [[ -L "${_FACTORY_DIRECTORY}/${REPLY}" ]] ; then
+ cp -P "${_FACTORY_DIRECTORY}/${REPLY}" \
+ "${_ed}/${REPLY}" \
+ || die
+ fi
done
}