Since git doesn't always handle symlinks the way bup expects (Cygwin),
don't keep them in git, create them via "t/configure-sampledata
--setup".
This also provides a place to handle anything else that falls outside
git's purview that we might want to add.
Integrate configure-sampledata into the makefile clean and all
targets.
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
default: all
all: bup Documentation/all
+ t/configure-sampledata --setup
bup: lib/bup/_version.py lib/bup/_helpers$(SOEXT) cmds
runtests: all runtests-python runtests-cmdline
-runtests-python:
+runtests-python: all
$(PYTHON) wvtest.py \
$(wildcard t/t*.py) \
$(filter-out lib/bup/t/tmetadata.py,$(wildcard lib/*/t/t*.py))
then umount bupmeta.tmp/testfs-limited || true; fi
rm -rf *.tmp *.tmp.meta t/*.tmp lib/*/*/*.tmp build lib/bup/build lib/bup/t/testfs
if test -e t/tmp; then rm -r t/tmp; fi
+ t/configure-sampledata --clean
--- /dev/null
+#!/usr/bin/env bash
+
+set -e -o pipefail
+
+top=$(pwd)
+
+usage()
+{
+ echo 'Usage: t/configure-sampledata [--setup | --clean]'
+}
+
+if test "$#" -ne 1; then
+ usage 1>&2; exit 1
+fi
+
+case "$1" in
+ '--setup')
+ (
+ cd t/sampledata
+ ln -sf a b
+ ln -sf b c
+ ln -sf /etc .
+ )
+ ;;
+ '--clean')
+ (
+ cd t/sampledata
+ if test -e b; then rm b; fi
+ if test -e c; then rm c; fi
+ if test -e etc; then rm etc; fi
+ )
+ ;;
+ *)
+ usage 1>&2; exit 1
+ ;;
+esac
+++ /dev/null
-a
\ No newline at end of file
+++ /dev/null
-b
\ No newline at end of file
+++ /dev/null
-/etc
\ No newline at end of file