%preun profile_mobile
# This is an un-installation.
if [ "$1" == "0" ]; then
- rm %{crosswalk_extensions_path}/libtizen*.so
- rm %{crosswalk_extensions_path}/plugins.json
+ if [ -n "$(ls %{crosswalk_extensions_path}/ | grep libtizen*.so)" ]; then
+ rm %{crosswalk_extensions_path}/libtizen*.so
+ fi
+ if [ -f %{crosswalk_extensions_path}/plugins.json ]; then
+ rm %{crosswalk_extensions_path}/plugins.json
+ fi
fi
%files profile_mobile
%dir %{crosswalk_extensions_path}/mobile/
%preun mobile-extension-emulator
# This is an un-installation.
if [ "$1" == "0" ]; then
- rm %{crosswalk_extensions_path}/libtizen*.so
- rm %{crosswalk_extensions_path}/plugins.json
+ if [ -n "$(ls %{crosswalk_extensions_path}/ | grep libtizen*.so)" ]; then
+ rm %{crosswalk_extensions_path}/libtizen*.so
+ fi
+ if [ -f %{crosswalk_extensions_path}/plugins.json ]; then
+ rm %{crosswalk_extensions_path}/plugins.json
+ fi
fi
%files mobile-extension-emulator
%dir %{crosswalk_extensions_path}/mobile_emulator/
%preun profile_wearable
# This is an un-installation.
if [ "$1" == "0" ]; then
- rm %{crosswalk_extensions_path}/libtizen*.so
- rm %{crosswalk_extensions_path}/plugins.json
+ if [ -n "$(ls %{crosswalk_extensions_path}/ | grep libtizen*.so)" ]; then
+ rm %{crosswalk_extensions_path}/libtizen*.so
+ fi
+ if [ -f %{crosswalk_extensions_path}/plugins.json ]; then
+ rm %{crosswalk_extensions_path}/plugins.json
+ fi
fi
%files profile_wearable
%dir %{crosswalk_extensions_path}/wearable/
%preun wearable-extension-emulator
# This is an un-installation.
if [ "$1" == "0" ]; then
- rm %{crosswalk_extensions_path}/libtizen*.so
- rm %{crosswalk_extensions_path}/plugins.json
+ if [ -n "$(ls %{crosswalk_extensions_path}/ | grep libtizen*.so)" ]; then
+ rm %{crosswalk_extensions_path}/libtizen*.so
+ fi
+ if [ -f %{crosswalk_extensions_path}/plugins.json ]; then
+ rm %{crosswalk_extensions_path}/plugins.json
+ fi
fi
%files wearable-extension-emulator
%dir %{crosswalk_extensions_path}/wearable_emulator/