Project

General

Profile

1
#!/bin/bash -e
2
# usage: . self
3
set -o errexit -o pipefail # errexit since may be called from shell
4

    
5
if test "$1" = .; then set --; fi # was .-included without args, so $@ is wrong
6

    
7
main()
8
{
9
	pushd "$(dirname -- "${BASH_SOURCE[0]}")/.."
10
	
11
	if test "${BASH_LINENO[1]}" = 0; then # was run without initial "."
12
		echo "usage: . $self (note initial \".\")"|fold -s >&2
13
		return 0 # not nonzero because this will close the shell
14
	fi
15
	
16
	set -x
17
	
18
	make backups/TNRS.backup-remake &
19
	dump_opts=${dump_opts---exclude-schema=public} \
20
make backups/vegbien.$version.backup/test &
21
	sleep 10 # wait for backup files to be created
22
	backups/fix_perms
23
	
24
	set +x
25
	popd
26
}
27
main "$@"
(44-44/87)