blob: 56f514b8a59473b9223dddc6d196d8339b4b022d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/bash
# Generate a list of symlinked files and directories.
# Each line must be the file path, relative to the git root.
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
|