diff --git a/dot_config/profile/profile.d/functions.sh.tmpl b/dot_config/profile/profile.d/functions.sh.tmpl index 5af8c9e..bb46dcb 100644 --- a/dot_config/profile/profile.d/functions.sh.tmpl +++ b/dot_config/profile/profile.d/functions.sh.tmpl @@ -13,6 +13,27 @@ source_env_file() { )" } +make_scripts() ( + for FILE in "$@"; do + make_script "${FILE}" + done +) + +make_script() ( + cat <<-EOF > "${1}" + #!/usr/bin/env bash + + set -euo pipefail + + main() ( + echo "todo" + ) + + main "$@" + EOF + chmod +x "${1}" +) + add_date_prefix() ( DIR=$(dirname "$1") FILE=$(basename "$1")