rcrun(8): Properly handle scripts that provide more than one keyword.
authorSascha Wildner <saw@online.de>
Fri, 14 Feb 2014 21:15:14 +0000 (22:15 +0100)
committerSascha Wildner <saw@online.de>
Fri, 14 Feb 2014 21:15:48 +0000 (22:15 +0100)
commit383f7785efcb01d31175ccda4e0a646271fa8544
tree93707ff76e95678ed6c93b9009cfe1e35718f1ff
parentd9c783bb278bae8373395931126396bb6d6cdd71
rcrun(8): Properly handle scripts that provide more than one keyword.

The loop that checks if all dependencies of the target are running
didn't take into account that there could be more than one PROVIDE
keyword in one script. It treated all PROVIDEs which were not named
like the target as not yet running dependencies and failed.

To fix, loop through the PROVIDEs twice, the first time to skip all
the PROVIDEs of the script if the target is one of them.

All this is due to the output of "rcorder -o ..." having the script
that provides the target which we want to run as its last element,
so document that with a comment.

Reported-by: joris
sbin/rcrun/rcrun.sh