#!/bin/sh
progdir=`dirname "$0"`
tname="$1"
exttname=${tname##*.}
if [[ $exttname == "pdf" ]] || [[ $exttname == "PDF" ]]; then
	$progdir/fbpdf "${tname}"
	wait
	exit
else
	if grep -q "简体中文" /mnt/mmc/CFW/language.flag; then
		$progdir/printstr "不是PDF文件, 无法读取."
	else
		$progdir/printstr "Not a PDF file, unable to read."
	fi
	sleep 2
fi
sync
