2011.03.20 修複失效連結
另外 restricted-extras 會需要用到 ttf-mscorefonts-installer ,這次順便處裡,會先把這兩個都移除,在照你們所需求的去安裝。
此腳本適用 Ubuntu 、 Kubuntu 、 Xubuntu ,會對應各版本的 restricted-extras 名稱。
gedit perfect_mscorefonts
複製、貼上以下程式碼:
#!/bin/bash
# by hepha
# http://playubuntu.blogspot.com/
# GPL or CC-BY-NA-SA
# 版號1 (11.05.2009)
u=`lsb_release -i |awk '{print $3}' | grep Ubuntu`
k=`lsb_release -i |awk '{print $3}' | grep Kubuntu`
x=`lsb_release -i |awk '{print $3}' | grep Xubuntu`
ttf=ttf-mscorefonts-installer
echo
echo welcome to perfect_mscorefonts ver 1
[ $u != "" ] && id=u
[ $k != "" ] && id=k
[ $x != "" ] && id=x
echo
read -p "你要處理$ttf或${id}buntu-restricted-extras問題嗎?(Y/N)" -n1 yn
[ $yn = "y" ] && purge=y
echo
echo
read -p "你要安裝${id}buntu-restricted-extras嗎?(Y/N)" -n1 yn
if [ $yn = "y" ]; then
install=y
else
echo
read -p "你要安裝$ttf嗎?(Y/N)" -n1 yn
if [ $yn = "y" ];then
mscore=y
fi
fi
ms_install ()
{
echo
wget -c http://dl.dropbox.com/u/1776325/ubuntu/${ttf}_3.1_all.deb -P /tmp
sudo dpkg -i /tmp/${ttf}_3.1_all.deb
if [ "$purge" = "y" ]; then
echo
sudo apt-get purge -y ${id}buntu-restricted-extras $ttf
fi
if [ "$install" = "y" ]; then
ms_install
sudo apt-get install -y ${id}buntu-restricted-extras
fi
if [ "$mscore" = "y" ]; then
ms_install
fi
}
chmod +x perfect_mscorefonts && ./perfect_mscorefonts
沒有留言:
張貼留言