update
This commit is contained in:
@@ -60,10 +60,21 @@ icc/ # ICC 色彩配置文件
|
||||
|
||||
## 更新流程
|
||||
|
||||
1. 在 mpv 中按 `M` 触发 manager.lua,观察控制台输出,确认无 `FAILED` 条目
|
||||
2. 更新完成后删除 manager 在子目录留下的嵌套 `.git`(否则 `git add` 会失败):
|
||||
1. 在 mpv 中按 `M` 触发 manager.lua,观察控制台输出,确认无 `FAILED` 条目。可能会有其他报错如 `[manager] Fehler: externes Repository manager existiert bereits.`,这是正常的。只需要确保不出现全大写的 `FAILED` 即可。
|
||||
2. 将 manager.lua 在 dest 目录产生的嵌套 `.git` 目录迁移到仓库内的 `.manager/`(避免根仓库误判为 submodule,幂等可重复执行):
|
||||
```bash
|
||||
find -L ~/.config/mpv -mindepth 2 -name .git -type d | sort -r | xargs rm -rf
|
||||
REPO=$(git -C ~/.config/mpv rev-parse --show-toplevel)
|
||||
GITSTORE="$REPO/.manager"
|
||||
mkdir -p "$GITSTORE"
|
||||
find -L ~/.config/mpv -mindepth 2 -name .git -type d | while read gitdir; do
|
||||
dest="${gitdir%/.git}"
|
||||
rel="${dest#$REPO/}"
|
||||
name=$(echo "$rel" | tr '/' '-')
|
||||
mv "$gitdir" "$GITSTORE/$name"
|
||||
depth=$(echo "$rel" | tr -cd '/' | wc -c)
|
||||
ups=$(printf '../%.0s' $(seq 1 $((depth + 1))))
|
||||
echo "gitdir: ${ups}.manager/$name" > "$dest/.git"
|
||||
done
|
||||
```
|
||||
3. 重启 mpv,检查控制台有无 `unknown key` 或脚本加载失败的警告
|
||||
4. 若有 `unknown key` 警告,说明对应脚本的配置项发生变化,找 `script-opts/` 下同名 `.conf` 对照脚本源码更新
|
||||
|
||||
Reference in New Issue
Block a user