#!/bin/sh -efu

. sh-functions
. shell-error

find "$scriptdir" -mindepth 1 -maxdepth 1 -type f |
	sort -n |
while read script; do
	[ -x "$script" ] || continue

	case "$script" in
		*~|*.bak|*.rpmnew|*.rpmsave) continue ;;
	esac

	verbose "Run: \`$script'"

	env WORKDIR="$workdir" \
	    ROOTDIR="$rootdir" \
		"$script" || fatal "$script: unable to run script."
done
