14
0

Accepting request 260382 from home:Ledest:misc

fix bashisms in pre script

OBS-URL: https://build.opensuse.org/request/show/260382
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenvwrapper?expand=0&rev=46
This commit is contained in:
Denisart Benjamin
2014-11-14 15:30:48 +00:00
committed by Git OBS Bridge
parent dc9925dab3
commit 9968e0f3fe
2 changed files with 7 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Nov 08 20:14:00 UTC 2014 - Led <ledest@gmail.com>
- fix bashisms in pre script
-------------------------------------------------------------------
Sun Mar 30 09:19:03 UTC 2014 - toddrme2178@gmail.com

View File

@@ -71,16 +71,14 @@ ln -s %{_bindir}/virtualenvwrapper_lazy-%{py_ver}.sh %{buildroot}%{_bindir}/vir
%pre
# Since python scripts became ghosted to be used with update-alternatives, we have to get rid
# of the old binary resulting from the non-update-alternativies-ified package:
[[ ! -L %{_bindir}/virtualenvwrapper.sh ]] && rm -f %{_bindir}/virtualenvwrapper.sh
[[ ! -L %{_bindir}/virtualenvwrapper_lazy.sh ]] && rm -f %{_bindir}/virtualenvwrapper_lazy.sh
exit 0
[ -h %{_bindir}/virtualenvwrapper.sh ] || rm -f %{_bindir}/virtualenvwrapper.sh
[ -h %{_bindir}/virtualenvwrapper_lazy.sh ] || rm -f %{_bindir}/virtualenvwrapper_lazy.sh
%post
update-alternatives \
--install %{_bindir}/virtualenvwrapper.sh virtualenvwrapper.sh %{_bindir}/virtualenvwrapper-%{py_ver}.sh 30 \
--slave %{_bindir}/virtualenvwrapper_lazy.sh virtualenvwrapper_lazy.sh %{_bindir}/virtualenvwrapper_lazy-%{py_ver}.sh
%preun
if [ $1 -eq 0 ] ; then
update-alternatives --remove virtualenvwrapper.sh %{_bindir}/virtualenvwrapper.sh-%{py_ver}