]> arthur.barton.de Git - bup.git/blob - t/configure-sampledata
Create symlinks in t/configure-sampledata; remove them from git.
[bup.git] / t / configure-sampledata
1 #!/usr/bin/env bash
2
3 set -e -o pipefail
4
5 top=$(pwd)
6
7 usage()
8 {
9     echo 'Usage: t/configure-sampledata [--setup | --clean]'
10 }
11
12 if test "$#" -ne 1; then
13     usage 1>&2; exit 1
14 fi
15
16 case "$1" in
17     '--setup')
18         (
19             cd t/sampledata
20             ln -sf a b
21             ln -sf b c
22             ln -sf /etc .
23         )
24         ;;
25     '--clean')
26         (
27             cd t/sampledata
28             if test -e b; then rm b; fi
29             if test -e c; then rm c; fi
30             if test -e etc; then rm etc; fi
31         )
32         ;;
33     *)
34         usage 1>&2; exit 1
35         ;;
36 esac