Ensure we do not override already existing data.
OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=96
This commit is contained in:
parent
c65b8ccb28
commit
3993b1ff9f
@ -19,10 +19,19 @@ change_linking() {
|
||||
# if we get ourselves folder then just create it
|
||||
# it might not be around so lets be safe
|
||||
if [[ -d "${file}" ]] ; then
|
||||
mkdir -p "${dir/${datadir}/${libdir}}"
|
||||
dirname="${dir/${datadir}/${libdir}}"
|
||||
# if the location is already there skip it
|
||||
if [[ ! -e "${dirname}" ]]; then
|
||||
mkdir -p "${dirname}"
|
||||
fi
|
||||
continue
|
||||
fi
|
||||
ln -sf "${file}" "${file/${datadir}/${libdir}}" || exit 1
|
||||
linkfile="${file/${datadir}/${libdir}}"
|
||||
# if the file is already there, skip it
|
||||
# this is true when the parent folder is link
|
||||
if [[ ! -e "${linfile}" ]]; then
|
||||
ln -sf "${file}" "${linfile}" || exit 1
|
||||
fi
|
||||
done
|
||||
else
|
||||
# first just remove the symlinks
|
||||
|
Loading…
Reference in New Issue
Block a user