#!/bin/sh cd /home/alex lockfile=communitywiki.org/noedit archive=community.tar.gz test -f $lockfile && exit 1 # abort if the lockfile exists touch $lockfile tar czf $archive --dereference --exclude=$archive communitywiki.org mv $archive communitywiki.org/ rm $lockfile