#!/bin/sh
tazpkg setup-undigest lupaworld http://mirror.lupaworld.com/Slitaz-cn/packages/
tazpkg recharge
ISO_URL="http://mirror.slitaz.org/iso/rolling/slitaz-rolling-core.iso"
ISO=$(basename $ISO_URL)
ISO_PATH="/home/slitaz/cooking/distro"
tazlito clean-distro
mkdir -p $ISO_PATH
cd $ISO_PATH
busybox wget -P .. $ISO_URL
tazlito extract-distro ../$ISO
cd rootfs
rm ./usr/share/locale/* -rf
yes | tazpkg remove locale-es --root=.
yes | tazpkg remove locale-de --root=.
yes | tazpkg remove locale-fr --root=.
yes | tazpkg remove locale-it --root=.
yes | tazpkg remove locale-pt --root=.
tazpkg get-install locale-zh_CN --root=$(pwd)
tazpkg get-install fcitx-pinyin --root=$(pwd)
echo "fcitx &" >> ./etc/xdg/openbox/autostart.sh
echo LANG=zh_CN.UTF-8 > ./etc/locale.conf
echo us > ./etc/keymap.conf
echo Asia/Shanghai > ./etc/TZ
echo "hwclock -l -s" >> ./etc/init.d/local.sh
echo 'export XMODIFIERS="@im=fcitx"' >> ./etc/skel/.profile
tazlito gen-initiso
# 生成的ISO文件在/home/slitaz/cooking/distro/slitaz-cooking.iso