#!/bin/sh

#-----[ usage ]---------------------------------------------
function usage ()
{
    echo "Usage   : ${0} file";
    echo "unlock file, you can see the lock at \"~/.$(basename file).lock\""
    exit;
}

#-----[ unlock ]--------------------------------------------
function unlock ()
{
    rm -f ${1};
}

#-----[ main ]----------------------------------------------
function main ()
{
    if test ${#} -ne 1 -o ! -f ${1}; then
	usage ${*};
    fi;

    unlock "${HOME}/.$(basename ${1}).lock"
}

#-----[ Corps ]---------------------------------------------
main ${*}
