Change-Id: I157f6a027820e0448e1ee95e10d1b42e8c95fcea
# this should correspond to what brp-symlink is doing
case $t in
/usr*)
- link_relative "$t" "$l" "$RPM_BUILD_ROOT"
- ;;
+ link_relative "$t" "$l" "$RPM_BUILD_ROOT"
+ ;;
*)
- mkdir -p "$(dirname "$RPM_BUILD_ROOT$l")" && \
- ln -snf "$t" "$RPM_BUILD_ROOT$l"
- ;;
+ if [ ! -e $t ]; then
+ link_relative "$t" "$l" "$RPM_BUILD_ROOT"
+ else
+ mkdir -p "$(dirname "$RPM_BUILD_ROOT$l")" && \
+ ln -snf "$t" "$RPM_BUILD_ROOT$l"
+ fi
+ ;;
esac
}