luci/contrib/package/luci-addons/dist/usr/bin/run-parts

18 lines
220 B
Text
Raw Normal View History

2008-04-27 11:10:09 +00:00
#!/bin/sh
set +e
if [ $# -lt 1 ]; then
echo "Usage: run-parts <dir>"
exit 1
fi
if [ ! -d $1 ]; then
echo "Not a directory: $1"
exit 1
fi
for i in $1/*; do
[ -x $i ] && $i
done
exit 0