#!/bin/sh
progdir=`dirname "$0"`
case "$1" in
	1)
		if [ -f "$progdir/../PSX_BIOS-OFF.sh" ]; then
			rm -f $progdir/../PSX_BIOS-OFF.sh
			rm -f $progdir/../PS特殊BIOS*
			cp -f $progdir/PS特殊BIOS-已关闭.sh $progdir/../
		elif [ -f "$progdir/../PSX_BIOS-ON.sh" ]; then
			rm -f $progdir/../PSX_BIOS-ON.sh
			rm -f $progdir/../PS特殊BIOS*
			cp -f $progdir/PS特殊BIOS-已开启.sh $progdir/../
		fi
		sync
		;;
	2)
		if [ -f "$progdir/../PS特殊BIOS-已关闭.sh" ]; then
			rm -f $progdir/../PS特殊BIOS-已关闭.sh
			rm -f $progdir/../PSX_BIOS*
			cp -f $progdir/PSX_BIOS-OFF.sh $progdir/../
		elif [ -f "$progdir/../PS特殊BIOS-已开启.sh" ]; then
			rm -f $progdir/../PS特殊BIOS-已开启.sh
			rm -f $progdir/../PSX_BIOS*
			cp -f $progdir/PSX_BIOS-ON.sh $progdir/../
		fi
		sync
		;;
esac
