mirror of
https://github.com/papers-we-love/papers-we-love.git
synced 2024-10-27 20:34:20 +00:00
16 lines
351 B
Bash
Executable File
16 lines
351 B
Bash
Executable File
#! /bin/bash
|
|
|
|
find -E . -regex '.*(pdf)$' -type f | while read f
|
|
do
|
|
p="$(basename "$f")"
|
|
dir="$(dirname "$f")"
|
|
lc=$(echo ${p} | tr '[:upper:]' '[:lower:]' \
|
|
| tr '_' '-' | tr -d ':' | tr -d ',' | tr '[:blank:]' '-' \
|
|
| sed 's/\-\-*/-/')
|
|
|
|
if [ "$p" != "$lc" ]
|
|
then
|
|
git mv -f "$dir/$p" "$dir/$lc"
|
|
fi
|
|
done
|