make remove-dashes: apply to scripts and programs as well, not just to builtins
All programs and scripts are now moved outside PATH, so it's a good idea not to use the dashed forms for them, either. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Miklos Vajna committed
Jul 11, 2008 at 02:12 UTC
b4f02d3509e8e4da0f115b9515d52daa02621db7
2 files changed
+10
-10
Makefile
+1
-1
@@ -1296,7 +1296,7 @@ check: common-cmds.h
1296
for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; done
1297
1298
remove-dashes:
1299
- ./fixup-builtins $(BUILT_INS)
1299
+ ./fixup-builtins $(BUILT_INS) $(PROGRAMS) $(SCRIPTS)
1300
1301
### Installation rules
1302
fixup-builtins
+9
-9
@@ -1,16 +1,16 @@
1
#!/bin/sh
2
while [ "$1" ]
3
do
4
- old="$1"
5
- new=$(echo "$1" | sed 's/git-/git /')
6
- echo "Converting '$old' to '$new'"
7
- git ls-files '*.sh' | while read file
8
- do
9
- sed "s/\\<$old\\>/$new/g" < $file > $file.new
10
- chmod --reference=$file $file.new
11
- mv $file.new $file
12
- done
4
+ if [ "$1" != "git-sh-setup" -a "$1" != "git-parse-remote" -a "$1" != "git-svn" ]; then
5
+ old="$1"
6
+ new=$(echo "$1" | sed 's/git-/git /')
7
+ echo "Converting '$old' to '$new'"
8
+ sed -i "s/\\<$old\\>/$new/g" $(git ls-files '*.sh')
9
+ fi
10
shift
11
done
12
+
13
+sed -i 's/git merge-one-file/git-merge-one-file/g
14
+s/git rebase-todo/git-rebase-todo/g' $(git ls-files '*.sh')
15
git update-index --refresh >& /dev/null
16
exit 0