Skip to content

Commit

Permalink
Clean up stale symlinks when creating symlinked list [ci skip]
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 11, 2016
1 parent 52f679b commit 43d3c51
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/generate_symlinked_list.sh
Expand Up @@ -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.