#!/bin/sh
#
# chexec - set exec flag on all files that should be executable

# shellcheck disable=SC2249
case "$1" in
  [0-9])
    depth="$1"
    shift
    ;;
esac
find . -maxdepth "${depth:-4}" \( -name "*.sh" -o -name "*.py" -o -path '*/githooks/*' \) "$@" -exec chmod -v +x {} +
