1
我已經創建了一個debian軟件包。我需要在安裝.deb時檢查Adobe Flash Player。如果Flash播放器沒有安裝,那麼我需要安裝它。在瀏覽時我知道postinst文件可以用於此目的。 postinst文件是通過postinst安裝Flash Player的腳本
#!/bin/bash
echo 「Stopping any Firefox that might be running」
sudo killall -9 firefox
echo 「Removing any other flash plugin previously installed:」
sudo apt-get remove -y –purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash swfdec-mozilla libflashsupport nspluginwrapper
sudo rm -f /usr/lib/mozilla/plugins/*flash*
sudo rm -f ~/.mozilla/plugins/*flash*
sudo rm -f /usr/lib/firefox/plugins/*flash*
sudo rm -f /usr/lib/firefox-addons/plugins/*flash*
sudo rm -rfd /usr/lib/nspluginwrapper
echo 「Installing Flash Player 10″
#cd ~
sudo cp /home/libflashplayer.so /usr/lib/mozilla/plugins/
echo 「Linking the libraries so Firefox and apps depending on XULRunner.」
sudo ln -sf /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/firefox-addons/plugins/
sudo ln -sf /usr/lib/mozilla/plugins/libflashplayer.so /usr/lib/xulrunner-addons/plugins/
# now doing some cleaning up:
sudo rm -rf libflashplayer.so
sudo rm -rf libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz
但是什麼也沒有發生。 任何人都可以幫我寫劇本通過腳本安裝Flash Player嗎?
爲什麼不列出Flash插件作爲包的依賴,使用Debian /控制? – Flexo 2011-02-10 11:36:14
是否有任何錯誤信息可以告訴我們? – 2011-02-10 15:45:30