diff options
Diffstat (limited to 'profiles/common')
-rw-r--r-- | profiles/common/profile.bashrc | 18 |
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 } |