Add makefile and gitignore.
This commit is contained in:
parent
9fe2f05491
commit
6f457fb7dd
4 changed files with 18 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
shellcheck.log
|
11
Makefile
Normal file
11
Makefile
Normal file
|
@ -0,0 +1,11 @@
|
|||
all: shellcheck
|
||||
|
||||
shellcheck: shellcheck.log
|
||||
|
||||
install: dvbackup shellcheck
|
||||
install -Dm 0755 --owner=root --group=root $< /usr/local/bin/
|
||||
|
||||
shellcheck.log: dvbackup
|
||||
shellcheck $< | tee $@
|
||||
|
||||
.PHONY: all shellcheck install
|
|
@ -20,4 +20,10 @@ DOCKER=./mock-docker.sh DOCKER_MOCK_VOLUME="$VOLUME_NAME" \
|
|||
../dvbackup.sh restore_all "$VOLUME_NAME.tar" || exit 1
|
||||
docker run --rm --volume="$VOLUME_NAME:/data" alpine \
|
||||
sh -c 'stat /data/a.txt' || exit 1
|
||||
|
||||
DOCKER=./mock-docker.sh DOCKER_MOCK_VOLUME="$VOLUME_NAME-0" \
|
||||
../dvbackup.sh restore_all "$VOLUME_NAME-0.tar" || exit 1
|
||||
docker run --rm --volume="$VOLUME_NAME-0:/data" alpine \
|
||||
sh -c 'stat /data/a.txt' || exit 1
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in a new issue