Advertisement
inukaze

Debians - Instalar Japones

Mar 23rd, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.87 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if  [ "$UID" != "0" ]; then
  4. xmessage -center -print "Este script debe ser lanzado con permisos de administrador"
  5. exit
  6. fi
  7.  
  8.  
  9. apt-get install -y cabextract ttf-kochi-mincho ttf-takao-mincho wine zenity joy2key
  10.  
  11. pack="qjoypad"
  12. statuswine=`dpkg -s "$pack" | grep -i status`
  13. echo "qjoypad = $statuswine"
  14. if [ "$1" == "--noqjoypad" ] || [ "$statuswine" == "Status: install ok installed" ] ; then
  15. echo "Proceeding without installing the qjoypad from GetDeb"
  16. else
  17. if [ -e "qjoypad_4.1.0-1~getdeb1_i386.deb" ]; then
  18. echo " Qjoypad be installed from this downloaded file"
  19. dpkg -i qjoypad_4.1.0-1~getdeb1_i386.deb
  20. rm -rf qjoypad_4.1.0-1~getdeb1_i386.deb
  21. else
  22. wget -c http://getdeb.avaneya.com/ubuntu/pool/games/q/qjoypad/qjoypad_4.1.0-1~getdeb1_i386.deb
  23. dpkg -i qjoypad_4.1.0-1~getdeb1_i386.deb
  24. rm -rf qjoypad_4.1.0-1~getdeb1_i386.deb
  25. fi
  26. fi
  27.  
  28.  
  29. if [ -e "/etc/locale.gen" ]; then
  30. # echo "se encontro locale.gen"
  31. cp -v /etc/locale.gen /etc/locale.gen-copia
  32. else
  33. echo -n > "/etc/locale.gen"
  34. # echo "se creo locale.gen en blanco"
  35. fi
  36. EUC=`grep "ja_JP.EUC-JP EUC-JP" "/etc/locale.gen"`
  37. UTF=`grep "ja_JP.UTF-8 UTF-8" "/etc/locale.gen"`
  38. echo "$EUC"
  39. if [ -z "$EUC" ]; then
  40. echo "ja_JP.EUC-JP EUC-JP" >> "/etc/locale.gen"
  41. # echo "no contiene ja EUC"
  42. else
  43. # echo "EUC tiene"
  44. sed -e 's/# ja_JP.EUC-JP EUC-JP/ja_JP.EUC-JP EUC-JP/g' "/etc/locale.gen" > "/etc/locale.gen0"
  45. rm -rfv "/etc/locale.gen"
  46. mv -v "/etc/locale.gen0" "/etc/locale.gen"
  47. fi
  48.  
  49.  
  50. echo "$UTF"
  51. if [ -z "$UTF" ]; then
  52. echo "ja_JP.UTF-8 UTF-8" >> "/etc/locale.gen"
  53. # echo "no contiene ja UTF"
  54. else
  55. # echo "UTF tiene"
  56. sed -e 's/# ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/g' "/etc/locale.gen" > "/etc/locale.gen0"
  57. rm -rfv "/etc/locale.gen"
  58. mv -v "/etc/locale.gen0" "/etc/locale.gen"
  59. fi
  60.  
  61. locale-gen
  62.  
  63. whoami
  64.  
  65. luser=`who | head -1 | tail -1 | awk '1 {print $1}'`
  66. su -c "bash .wine-prep.sh" $luser
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement