#!/bin/bash

# run-parts - concept taken from Debian

# keep going when something fails
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
	[ -d $i ] && continue
	if [ -x $i ]; then
		$i
	fi
done

exit 0
