On 19-Nov-19 5:38 PM, Thomas Monjalon wrote:
08/11/2019 17:25, Anatoly Burakov:
In order to facilitate mass updating of version files, add a shell
script that recurses into lib/ and drivers/ directories and calls
the ABI version update script.
Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com>
Acked-by: Bruce Richardson <bruce.richard...@intel.com>
--- /dev/null
+++ b/buildtools/update-abi.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
For such script, I think -e is mandatory, so we do not miss any error.
It would just require merge following check in the "if":
As was discussed on IRC, i'm fine with -e added to shebang, but i don't
like if statements that take half of my monitor :) I would rather put it
into a function. I just tested it:
```
#!/bin/sh -e
func() {
false
}
if [ !func ]; then
echo "Error"
fi
func
echo "This is never reached"
```
This outputs "Error". So i think i'll go ahead and make it into a
function. This would still leave the code readable, *and* satisfy the
"#!/bin/sh -e" shebang requirement :)
--
Thanks,
Anatoly