#./.lock_postcloning_hruehl export s_username=`basename $HOME` export s_lockfile_prefix=./.lock_postcloning export s_lockfile=${s_lockfile_prefix}_${s_username} s_lockfile_check=`ls -1 ${s_lockfile_prefix}* 2>/dev/null` if [[ $? -eq 0 ]] then if [ "${s_lockfile_check}" = "${s_lockfile}" ] then echo noop >/dev/null else s_lockuser=$(echo ${s_lockfile_check} | sed -e's/\_/ /g' | awk '{print $3}') echo "ERROR! Framework is currently locked by user <${s_lockuser}>!" fi else touch ${s_lockfile} chmod 000 ${s_lockfile} fi