/
githubmirror
/
bash-completion
Обзор
Документация
Войти
/
githubmirror
/
bash-completion
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.15.0
test/fallback/update-fallback-links
20 строк
403 B
Ville Skyttä
test(pre-commit): shfmt+shellcheck test/fallback/update-fallback-links
27 ноя 2023, 01:13
27 ноя 2023, 01:13
336488d
Код
Авторство
О чём код?
#!/usr/bin/env bash set -euo pipefail is_tracked_by_git() { git ls-files --error-unmatch "$1" &>/dev/null } cd "$(dirname "$0")/completions" for f in *; do if [[ -L $f ]] && is_tracked_by_git "$f"; then git rm -f "$f" fi done for f in ../../../completions/_*; do if is_tracked_by_git "$f"; then ln -sf "$f" "${f##*/_}" git add --verbose "${f##*/_}" fi done