mirror of
https://github.com/papers-we-love/papers-we-love.git
synced 2026-03-02 03:40:31 +00:00
add minor cleanup scripts for naming
This commit is contained in:
15
.scripts/cleanup.sh
Executable file
15
.scripts/cleanup.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#! /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
|
||||||
Binary file not shown.
Reference in New Issue
Block a user