diff options
| author | Paul Buetow <paul@buetow.org> | 2022-02-19 10:59:23 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2022-02-19 10:59:23 +0000 |
| commit | e2e7f1477f16c97c676501ca9b98907135bb8155 (patch) | |
| tree | 6556c19593b2920f18dbf4118a1fe849e86fabf4 /Makefile | |
| parent | 75c62b3abb4f84c2dc967b9f9289df10cb6af227 (diff) | |
more on shellcheck
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 33 |
1 files changed, 16 insertions, 17 deletions
@@ -1,6 +1,8 @@ NAME=photoalbum #DESTDIR=/ -all: version documentation build +all: version build +version: + cut -d' ' -f2 changelog | head -n 1 | sed 's/(//;s/)//' > .version build: test ! -d ./bin && mkdir ./bin || exit 0 sed "s/PHOTOALBUMVERSION/$$(cat .version)/" src/$(NAME).sh > ./bin/$(NAME) @@ -19,20 +21,17 @@ deinstall: clean: test -d ./bin && rm -Rf ./bin || exit 0 test -d ./debian/photoalbum && rm -Rf ./debian/photoalbum || exit 0 -version: - cut -d' ' -f2 changelog | head -n 1 | sed 's/(//;s/)//' > .version # Builds the documentation into a manpage -documentation: - pod2man --release="$(NAME) $$(cat .version)" \ - --center="User Commands" ./docs/$(NAME).pod > ./docs/$(NAME).1 - pod2text ./docs/$(NAME).pod > ./docs/$(NAME).txt - # For github page - cp ./docs/$(NAME).pod README.pod -release: all - bash -c "git tag $$(cat .version)" - git push --tags - git commit -a -m 'New release' - git push origin master -clean-top: - rm ../$(NAME)_*.tar.gz - rm ../$(NAME)_*.changes +shellcheck: + # SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location. + # SC2012: Use find instead of ls to better handle non-alphanumeric filenames. + # SC2155: Declare and assign separately to avoid masking return values. + # SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. + # SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting). + shellcheck \ + --exclude SC1090 \ + --exclude SC2012 \ + --exclude SC2155 \ + --exclude SC2164 \ + --exclude SC2207 \ + ./src/photoalbum.sh |
