#!/bin/sh
#   xpic picname pipname
#
# After getting the lock, copy the picname file to the pipname file.
#
L=LK.xpic
while [ -f "$L" ];do sleep 1;done
ln $1 $L
cp $1 $2
rm $L
