mdserver-web/plugins/gogs/hook/self_hook.tpl

14 lines
258 B
Smarty
Raw Permalink Normal View History

2023-10-29 11:50:32 -04:00
#!/bin/bash
2023-10-29 12:25:45 -04:00
H_DIR={$HOOK_DIR}
HL_DIR={$HOOK_LOGS_DIR}
2023-10-29 13:48:26 -04:00
SH_LIST=`cd ${H_DIR} && ls | grep ".sh$"`
2023-10-29 12:25:45 -04:00
for sh_f in $SH_LIST; do
ABS_FILE=${H_DIR}/${sh_f}
ABS_LOGS=${HL_DIR}/${sh_f}.log
echo "sh ${ABS_FILE} 2>${ABS_LOGS}"
sh -x ${ABS_FILE} 2>${ABS_LOGS}
done