git://git.nikiroo.be
/
nikiroo-utils.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fix STOP server
[nikiroo-utils.git]
/
derename.sh
1
#!/bin/sh
2
3
git status |
grep
renamed
:
|
sed
's/[^:]*: *\([^>]*\) -> \(.*\)/\1>\2/g'
|
while
read -r
ln
;
do
4
old
=
"`echo "
$ln
" | cut -f1 -d'>'`"
5
new
=
"`echo "
$ln
" | cut -f2 -d'>'`"
6
mkdir
-p
"`dirname "
$old
"`"
7
git
mv
"
$new
"
"
$old
"
8
rmdir
"`dirname "
$new
"`"
2
>/
dev
/
null
9
true
10
done
11