13 lines
488 B
Bash
Executable File
13 lines
488 B
Bash
Executable File
#!/bin/bash
|
|
# sync_profile_scripts.sh — 把 deploy/profile-scripts 全部硬链接到 profile scripts 目录
|
|
# 每次部署(scp/git)后必须跑:scp替换文件会破坏硬链接(inode变更),导致cron跑旧版本。
|
|
set -e
|
|
SRC="/home/hmo/MoFin/deploy/profile-scripts"
|
|
DST="/home/hmo/.hermes/profiles/position-analyst/scripts"
|
|
count=0
|
|
for f in "$SRC"/*.py; do
|
|
name=$(basename "$f")
|
|
ln -f "$f" "$DST/$name"
|
|
count=$((count+1))
|
|
done
|
|
echo "synced $count scripts (hardlink)" |