File install_pinyin_database.sh of Package scim-python

#!/bin/bash
DBVER=0.1.10.5
cd $HOME
if [ ! -e py.db ]; then
wget http://scim-python.googlecode.com/files/pinyin-database-$DBVER.tar.bz2
tar jxvf pinyin-database-$DBVER.tar.bz2
fi
echo "Need root privilege to install py.db, Enter root password"
sudo cp py.db /usr/share/scim-python/engine/PinYin/
cd /usr/share/scim-python/engine/PinYin
echo "May take minutes, Please wait..."
echo "Creating INDEX..."
sudo python -c "import PYSQLiteDB; db = PYSQLiteDB.PYSQLiteDB (filename='py.db'); db.create_indexes ();"
echo "Done."

openSUSE Build Service is sponsored by