Skip to content

Commit

Permalink
0.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishimoto Shinobu committed Feb 26, 2021
1 parent 5d0803b commit 7b02bc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('tsukuri', 'c',
version: '0.2.4',
version: '0.2.5',
meson_version: '>= 0.55.0',
license: 'ISC',
default_options : ['c_std=c18']
Expand Down
12 changes: 2 additions & 10 deletions src/tsukuri.in
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ run_scripts() {
}

run_hooks() {
local a triggers trigname trigdest trigdestexist trigcmd files
local a triggers trigname trigdest rigcmd files

if [ -f "$rootdir/.FILES" ]; then
files="$rootdir/.FILES"
Expand All @@ -798,19 +798,11 @@ run_hooks() {
for triggers in "$rootdir/usr/lib/tsukuri/triggers/"*.trigger; do
trigname="$(jq -r '.trigger.name' $triggers)"
trigdest="$(jq -r '.trigger.directory[]' $triggers)"
if [ -n "$(cat $triggers | grep -w 'directories_exist')" ]; then
trigdestexist="$(jq -r '.trigger.directories_exist[]' $triggers)"
fi
trigcmd="$(jq -r '.trigger.command' $triggers)"

if [ -n "$trigname" ] && [ -n "$trigdest" ]; then
[ -n "$trigdestexist" ] && {
for a in $trigdestexist; do
[ ! -d "${rootdir}${a}" ] && return 0
done
}
for a in $trigdest; do
if [ -f "$rootdir/usr/lib/tsukuri/db/$1/files" ]; then
if [ -f "$rootdir/usr/lib/tsukuri/db/$1/files" ] && ; then
grep -q -F "$trigdest" "$files" && {
if [ -n "$trigcmd" ]; then
msg "Running triggers: $trigname"
Expand Down

0 comments on commit 7b02bc2

Please sign in to comment.