#!/bin/shout_file="./fmt_df.txt"cur_dir=$(pwd)script_dir=tools/echo "[git-hook]: before commit, format code use mpp_astyle.sh ..."cd $script_dir./mpp_astyle.shcd $cur_dirgit status -s | grep "^MM " > $out_fileif [ -s $out_file ]then {echo "[git-hook]: code changed after formating, please commit again."rm $out_fileecho "[git-hook]: git status below:"git statusexit 1} else {echo "[git-hook]: nothing change after formating, commit continues."if [ -f $out_file ]then {rm $out_file} fiexit 0} fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。