»
(008) CubeIDE Implementation of USB Peripherals*
(018) C99 pointer*
(019) C99 With only value assignment*
(022) POSIX pthread multi-threads mutex*
(023) POSIX pthread multi-threads programming*
(027) C99 time and wait*
(028) High-precision calculation with GMP*
(029) Web Service Lib*
(030) International Components for Unicode (ICU)*
(031) Performance of C is higher than C++, because...*
🍓(016) 拷贝pre-receive到每个git仓库的脚本
拷贝pre-receive到每个git仓库的脚本:
(来源于ChatGPT与Deepseek):
(已验证)
#!/bin/bash
PRE_RECEIVE_SCRIPT="/mnt/usb/git-repo/pre-receive"
if [ ! -f "$PRE_RECEIVE_SCRIPT" ]; then
echo "pre-receive script does not exist: $PRE_RECEIVE_SCRIPT"
exit 1
fi
find . -type d -name "hooks" | while read hooks_dir; do
if [ -d "$hooks_dir" ]; then
cp "$PRE_RECEIVE_SCRIPT" "$hooks_dir/pre-receive"
echo "Copied pre-receive script to $hooks_dir"
fi
done