#!/bin/sh
progdir=`dirname "$0"`
case "$1" in
	1)
		if [ -f "$progdir/../Dark_mode-OFF.sh" ]; then
			rm -f $progdir/../Dark_mode-OFF.sh
			rm -f $progdir/../夜间模式*
			cp -f $progdir/夜间模式-已关闭.sh $progdir/../
		elif [ -f "$progdir/../Dark_mode-ON.sh" ]; then
			rm -f $progdir/../Dark_mode-ON.sh
			rm -f $progdir/../夜间模式*
			cp -f $progdir/夜间模式-已开启.sh $progdir/../
		fi
		sync
		;;
	2)
		if [ -f "$progdir/../夜间模式-已关闭.sh" ]; then
			rm -f $progdir/../夜间模式-已关闭.sh
			rm -f $progdir/../Dark_mode*
			cp -f $progdir/Dark_mode-OFF.sh $progdir/../
		elif [ -f "$progdir/../夜间模式-已开启.sh" ]; then
			rm -f $progdir/../夜间模式-已开启.sh
			rm -f $progdir/../Dark_mode*
			cp -f $progdir/Dark_mode-ON.sh $progdir/../
		fi
		sync
		;;
esac
