#!/bin/sh
progdir=`dirname "$0"`
case "$1" in
	1)
		if [ -f "$progdir/../SWAP-OFF.sh" ]; then
			rm -f $progdir/../SWAP-OFF.sh
			rm -f $progdir/../虚拟内存*
			cp -f $progdir/虚拟内存-已关闭.sh $progdir/../
		elif [ -f "$progdir/../SWAP-ON.sh" ]; then
			rm -f $progdir/../SWAP-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/../SWAP*
			cp -f $progdir/SWAP-OFF.sh $progdir/../
		elif [ -f "$progdir/../虚拟内存-已开启.sh" ]; then
			rm -f $progdir/../虚拟内存-已开启.sh
			rm -f $progdir/../SWAP*
			cp -f $progdir/SWAP-ON.sh $progdir/../
		fi
		sync
		;;
esac
