diff options
Diffstat (limited to 'scripts/generate_symlinked_list.sh')
| -rwxr-xr-x | scripts/generate_symlinked_list.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/generate_symlinked_list.sh b/scripts/generate_symlinked_list.sh index fe7a7cc..56f514b 100755 --- a/scripts/generate_symlinked_list.sh +++ b/scripts/generate_symlinked_list.sh @@ -6,4 +6,12 @@ WDir="${PWD##*/}" [[ $WDir == 'scripts' ]] && cd .. dst='nikola/data/symlinked.txt' + +# Remove stale symlinks +for f in $(git ls-files -s | awk '/120000/{print $4}'); do + if [[ ! -e $f ]]; then + git rm -f $f + fi +done + git ls-files -s | awk '/120000/{print $4}' > $dst |
