Add makefile.
This commit is contained in:
parent
d7696331d0
commit
5faa00a815
4 changed files with 19 additions and 3 deletions
6
Makefile
Normal file
6
Makefile
Normal file
|
@ -0,0 +1,6 @@
|
|||
SOURCES := $(shell cd ./src && find ./ -type f -and -not -name '*.vars')
|
||||
|
||||
shellcheck:
|
||||
cd ./src && shellcheck ${SOURCES}
|
||||
|
||||
.PHONY: shellcheck
|
|
@ -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--"
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
|
||||
set -e
|
||||
|
||||
# shellcheck disable=SC2153
|
||||
directory="${DIRECTORY}"
|
||||
# shellcheck disable=SC2153
|
||||
workdir="${WORKDIR}"
|
||||
# shellcheck disable=SC2153
|
||||
extract="${EXTRACT}"
|
||||
(
|
||||
if "$extract"; then
|
||||
|
|
Loading…
Reference in a new issue