6 |
|
%prep |
7 |
|
%build |
8 |
|
%install |
9 |
+ |
|
10 |
|
%post |
11 |
< |
[ -f $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup ] || { echo "XCMSI installation not found. Quitting without doing anything." ; exit 0} |
12 |
< |
source $RPM_INSTALL_PREFIX/cmsset_default.sh |
13 |
< |
scramv1 db -link $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup |
11 |
> |
echo "Linking old XCMSI scram database to the new one..." |
12 |
> |
if [ ! -f $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup ] |
13 |
> |
then |
14 |
> |
echo "XCMSI installation not found. Quitting without doing anything." |
15 |
> |
else |
16 |
> |
source $RPM_INSTALL_PREFIX/cmsset_default.sh |
17 |
> |
scramv1 db -link $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup |
18 |
> |
scramv1 db link $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup |
19 |
> |
fi |
20 |
> |
|
21 |
|
%preun |
22 |
< |
[ -f $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup ] || { echo "XCMSI installation not found. Quitting without doing anything." ; exit 0} |
23 |
< |
source $RPM_INSTALL_PREFIX/cmsset_default.sh |
24 |
< |
scramv1 db -link $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup |
22 |
> |
echo "Unlinking old XCMSI scram database from the new one..." |
23 |
> |
if [ ! -f $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup ] |
24 |
> |
then |
25 |
> |
echo "XCMSI installation not found. Quitting without doing anything." |
26 |
> |
exit 0 |
27 |
> |
else |
28 |
> |
source $RPM_INSTALL_PREFIX/cmsset_default.sh |
29 |
> |
scramv1 db -unlink $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup |
30 |
> |
scramv0 db unlink $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup |
31 |
> |
fi |