Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ "$UID" != "0" ]; then
- xmessage -center -print "Este script debe ser lanzado con permisos de administrador"
- exit
- fi
- apt-get install -y cabextract ttf-kochi-mincho ttf-takao-mincho wine zenity joy2key
- pack="qjoypad"
- statuswine=`dpkg -s "$pack" | grep -i status`
- echo "qjoypad = $statuswine"
- if [ "$1" == "--noqjoypad" ] || [ "$statuswine" == "Status: install ok installed" ] ; then
- echo "Proceeding without installing the qjoypad from GetDeb"
- else
- if [ -e "qjoypad_4.1.0-1~getdeb1_i386.deb" ]; then
- echo " Qjoypad be installed from this downloaded file"
- dpkg -i qjoypad_4.1.0-1~getdeb1_i386.deb
- rm -rf qjoypad_4.1.0-1~getdeb1_i386.deb
- else
- wget -c http://getdeb.avaneya.com/ubuntu/pool/games/q/qjoypad/qjoypad_4.1.0-1~getdeb1_i386.deb
- dpkg -i qjoypad_4.1.0-1~getdeb1_i386.deb
- rm -rf qjoypad_4.1.0-1~getdeb1_i386.deb
- fi
- fi
- if [ -e "/etc/locale.gen" ]; then
- # echo "se encontro locale.gen"
- cp -v /etc/locale.gen /etc/locale.gen-copia
- else
- echo -n > "/etc/locale.gen"
- # echo "se creo locale.gen en blanco"
- fi
- EUC=`grep "ja_JP.EUC-JP EUC-JP" "/etc/locale.gen"`
- UTF=`grep "ja_JP.UTF-8 UTF-8" "/etc/locale.gen"`
- echo "$EUC"
- if [ -z "$EUC" ]; then
- echo "ja_JP.EUC-JP EUC-JP" >> "/etc/locale.gen"
- # echo "no contiene ja EUC"
- else
- # echo "EUC tiene"
- sed -e 's/# ja_JP.EUC-JP EUC-JP/ja_JP.EUC-JP EUC-JP/g' "/etc/locale.gen" > "/etc/locale.gen0"
- rm -rfv "/etc/locale.gen"
- mv -v "/etc/locale.gen0" "/etc/locale.gen"
- fi
- echo "$UTF"
- if [ -z "$UTF" ]; then
- echo "ja_JP.UTF-8 UTF-8" >> "/etc/locale.gen"
- # echo "no contiene ja UTF"
- else
- # echo "UTF tiene"
- sed -e 's/# ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/g' "/etc/locale.gen" > "/etc/locale.gen0"
- rm -rfv "/etc/locale.gen"
- mv -v "/etc/locale.gen0" "/etc/locale.gen"
- fi
- locale-gen
- whoami
- luser=`who | head -1 | tail -1 | awk '1 {print $1}'`
- su -c "bash .wine-prep.sh" $luser
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement