diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 7f998e0..2edeb9c 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -1601,13 +1601,17 @@ case "${game}" in add_launcher "c:\Program Files\bloodshed.exe" ;; "Bokurano Daibouken 3") + if [[ ! -r "${cache}/bk3-dict.dat" ]]; then + echo "http://www.nyanchangames.com/order/bk3translate.html" | xclip -selection clipboard 2> /dev/null + dialog --backtitle "Audiogame manager" --msgbox "If you would like English translations, the file is available at http://www.nyanchangames.com/order/bk3translate.html. Save the dict.dat file to your Downloads or Desktop directory. For convenience the url has been copied to your clipboard. Press enter when you are ready to continue." -1 -1 --stdout + fi dictFile="" for i in "${HOME}/Downloads/dict.dat" "${HOME}/Desktop/dict.dat" ; do if [[ -r "$i" ]]; then dictFile="$i" fi done - if [[ "$i" != "" ]] && [[ ! -r "${cache}/bk3-dict.dat" ]]; then + if [[ "${#i}" -ge 3 ]] && [[ ! -r "${cache}/bk3-dict.dat" ]]; then dialog --backtitle "Audiogame manager" --yesno "Possible English translation file found at $dictFile. Would you like to use it for BK3?" -1 -1 --stdout && cp -v "$dictFile" "${cache}/bk3-dict.dat" fi export bottle="nyanchan"