set -e
set -u
+if [ "`id -u`" != "`stat -c %u "$base"`" ]; then
+ echo >&2 "You are probably running this as the wrong user."
+ exit 1
+fi
lock() {
local fd="$1"; shift
echo "$0: Updating master copy of $component..."
rsync --delete \
-trz \
- --links --safe-links \
+ --links --hard-links --safe-links \
--link-dest="$tgt" \
"$src/." "$tmpdir_new/."
echo "$0: Done. Committing."