8. SUBVERSION HACKS
#!/bin/sh
mv "$1" “$1”.orig #
# Hello, world!
echo "n--This line, and those below, will be ignored--" > "$1"
echo "Hello, world!" >> “$1”
#
cat "$1".orig >> "$1"
rm "$1".orig
vi “$1" #
exit 0
~/tmp/commit.sh
8
9. SUBVERSION HACKS
--This line, and those below, will be ignored--
Hello, world!
--This line, and those below, will be ignored--
M myfile
(SVN_EDITOR=~/tmp/commit.sh svn commit )
9
12. SUBVERSION HACKS
#!/bin/sh
echo "num args: $#"
for arg in $@; do
echo "-----"
echo $arg
done
mv "$1" "$1".orig
#
cat <<'_EOT_' > "$1"
--This line, and those below, will be ignored--
fix, add, change commit
- Fix typo in docs
- Remove unused code
- Remove use of deprecated method
- Update Modernizr to v1.6
- Make it possible to have IDs per request
- Make sure to reset default_url_options
- Don't use "assert_not_nil"
- Allow the user to drag faster
- Remove methods to avoid warnings.
---
_EOT_
# 3 ( )
tail -n +3 "$1".orig >> "$1"
rm "$1".orig
#
vi "$1"
exit 0
http://qiita.com/sagaraya/items/60e983856e16dc571f22
12