我已经创建了一个debian包。在安装此.deb时,我需要检查Adobe Flash Player。如果flash播放器没有安装,那么我也需要安装它。在浏览时,我了解到postinst文件可以用于此目的。postinst文件是
#!/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的脚本?
发布于 2011-02-10 19:42:47
看起来你弄错了你的$HOME路径:
sudo cp /home/libflashplayer.so /usr/lib/mozilla/plugins/你的意思是:
sudo cp $HOME/libflashplayer.so /usr/lib/mozilla/plugins/https://stackoverflow.com/questions/4956517
复制相似问题