Add makefile and gitignore.

This commit is contained in:
redxef 2022-08-30 22:59:01 +02:00
parent 9fe2f05491
commit 6f457fb7dd
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921
4 changed files with 18 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
shellcheck.log

11
Makefile Normal file
View 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

View file

@ -20,4 +20,10 @@ DOCKER=./mock-docker.sh DOCKER_MOCK_VOLUME="$VOLUME_NAME" \
../dvbackup.sh restore_all "$VOLUME_NAME.tar" || exit 1 ../dvbackup.sh restore_all "$VOLUME_NAME.tar" || exit 1
docker run --rm --volume="$VOLUME_NAME:/data" alpine \ docker run --rm --volume="$VOLUME_NAME:/data" alpine \
sh -c 'stat /data/a.txt' || exit 1 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 exit 0