fix problem removing broken links

This commit is contained in:
2024-02-13 14:21:42 +01:00
parent 8557d8adce
commit fd436c40e8

View File

@@ -211,10 +211,7 @@ shopt -s extglob
%post
shopt -s extglob
if [ -e /etc/profile.d/epics-base.sh ]
then
%{__rm} -f /etc/profile.d/epics-base.sh
fi
%{__rm} -f /etc/profile.d/epics-base.sh
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/epics-base.sh | /usr/bin/head -n1)" /etc/profile.d/
SYSTEMD_DIR=$(pkg-config systemd --variable=systemdsystemunitdir)
@@ -229,10 +226,7 @@ fi
%postun
shopt -s extglob
if [ -e /etc/profile.d/epics-base.sh ]
then
%{__rm} -f /etc/profile.d/epics-base.sh
fi
%{__rm} -f /etc/profile.d/epics-base.sh
%{__ln_s} "$(/usr/bin/ls -dvr1 /usr/local/epics/base-+([0-9]).+([0-9]).+([0-9])/bin/epics-base.sh 2>/dev/null | /usr/bin/head -n1)" /etc/profile.d/ 2>/dev/null
SYSTEMD_DIR=$(pkg-config systemd --variable=systemdsystemunitdir)