Skip to content
Permalink
Browse files

Clean up stale symlinks when creating symlinked list [ci skip]

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 11, 2016
1 parent 52f679b commit 43d3c51ccbc53926dceb640d7ba369a97ef04512
Showing with 8 additions and 0 deletions.
  1. +8 −0 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

0 comments on commit 43d3c51

Please sign in to comment.
You can’t perform that action at this time.