Skip to content

Commit

Permalink
@goal_glob #18
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Jul 28, 2021
1 parent 9bd3325 commit f652720
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 1 addition & 4 deletions makesure.awk
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ function prepareArgs( i,arg) {
Options["tracing"]
if ("-t" in Args || "--timing" in Args)
Options["timing"]
#dbgA("ARGV", ARGV)
#dbgA("Args", Args)
#dbgA("ArgGoals", ArgGoals)
}

function dbgA(name, arr, i) { print "--- " name ": "; for (i in arr) print i " : " arr[i] }
Expand Down Expand Up @@ -176,7 +173,7 @@ function registerGoal(goal_name) {

function calcGlob(pattern, script, file) {
split("",GlobFiles)
script = MyDirScript "; for f in ./" pattern " ; do echo $f ; done"
script = MyDirScript "; for f in ./" pattern " ; do test -e \"$f\" && echo \"$f\" ; done"
while (script | getline file) {
file = substr(file, 3)
arrPush(GlobFiles,file)
Expand Down
3 changes: 3 additions & 0 deletions tests/11_goal_glob.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
echo "$ITEM :: $INDEX :: $TOTAL"
cat $ITEM

@goal_glob non-existent-glob*
echo "wtf"

@goal test1
@depends_on 11_goal_glob_1.txt
@depends_on 11_goal_glob_2.txt
Expand Down

0 comments on commit f652720

Please sign in to comment.