Add makefile.

This commit is contained in:
redxef 2022-05-06 15:39:34 +02:00
parent d7696331d0
commit 5faa00a815
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921
4 changed files with 19 additions and 3 deletions

6
Makefile Normal file
View file

@ -0,0 +1,6 @@
SOURCES := $(shell cd ./src && find ./ -type f -and -not -name '*.vars')
shellcheck:
cd ./src && shellcheck ${SOURCES}
.PHONY: shellcheck

View file

@ -2,7 +2,9 @@
set -e
# shellcheck disable=SC2153
directory="${DIRECTORY}"
# shellcheck disable=SC2153
files="${FILES}"
if [ -z "$files" ]; then
@ -14,7 +16,7 @@ fi
echo "$directory/$file"
if [ -e "$directory/$file" ]; then
echo true
echo "$(stat --format=%Y "$directory/$file")"
stat --format=%Y "$directory/$file"
else
echo false
echo "# --PLACEHOLDER--"

View file

@ -2,9 +2,14 @@
set -e
# shellcheck disable=SC2153
directory="${DIRECTORY}"
# shellcheck disable=SC2153
files="${FILES}"
newline_str='
'
(
echo tar c $files >&2
IFS=$'\n' tar c $files
cd "$directory"
#shellcheck disable=SC2086
IFS="$newline_str" tar c $files
)

View file

@ -2,8 +2,11 @@
set -e
# shellcheck disable=SC2153
directory="${DIRECTORY}"
# shellcheck disable=SC2153
workdir="${WORKDIR}"
# shellcheck disable=SC2153
extract="${EXTRACT}"
(
if "$extract"; then