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
|
set -e
|
||||||
|
|
||||||
|
# shellcheck disable=SC2153
|
||||||
directory="${DIRECTORY}"
|
directory="${DIRECTORY}"
|
||||||
|
# shellcheck disable=SC2153
|
||||||
files="${FILES}"
|
files="${FILES}"
|
||||||
|
|
||||||
if [ -z "$files" ]; then
|
if [ -z "$files" ]; then
|
||||||
|
@ -14,7 +16,7 @@ fi
|
||||||
echo "$directory/$file"
|
echo "$directory/$file"
|
||||||
if [ -e "$directory/$file" ]; then
|
if [ -e "$directory/$file" ]; then
|
||||||
echo true
|
echo true
|
||||||
echo "$(stat --format=%Y "$directory/$file")"
|
stat --format=%Y "$directory/$file"
|
||||||
else
|
else
|
||||||
echo false
|
echo false
|
||||||
echo "# --PLACEHOLDER--"
|
echo "# --PLACEHOLDER--"
|
||||||
|
|
|
@ -2,9 +2,14 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# shellcheck disable=SC2153
|
||||||
directory="${DIRECTORY}"
|
directory="${DIRECTORY}"
|
||||||
|
# shellcheck disable=SC2153
|
||||||
files="${FILES}"
|
files="${FILES}"
|
||||||
|
newline_str='
|
||||||
|
'
|
||||||
(
|
(
|
||||||
echo tar c $files >&2
|
cd "$directory"
|
||||||
IFS=$'\n' tar c $files
|
#shellcheck disable=SC2086
|
||||||
|
IFS="$newline_str" tar c $files
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,8 +2,11 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# shellcheck disable=SC2153
|
||||||
directory="${DIRECTORY}"
|
directory="${DIRECTORY}"
|
||||||
|
# shellcheck disable=SC2153
|
||||||
workdir="${WORKDIR}"
|
workdir="${WORKDIR}"
|
||||||
|
# shellcheck disable=SC2153
|
||||||
extract="${EXTRACT}"
|
extract="${EXTRACT}"
|
||||||
(
|
(
|
||||||
if "$extract"; then
|
if "$extract"; then
|
||||||
|
|
Loading…
Reference in a new issue