diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-02-07 16:29:13 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-02-07 16:29:13 +0200 |
commit | b9402bd52dc47ef3b6bf439276ec536fe9ddb18a (patch) | |
tree | adef95cc9ac7a6661871a02a8b4f34ca54560bba /git |
Start with git helper scripts and extra documentation
Diffstat (limited to 'git')
-rwxr-xr-x | git/commit.sh | 20 | ||||
-rwxr-xr-x | git/diff.sh | 16 | ||||
-rw-r--r-- | git/modules | 1 | ||||
-rwxr-xr-x | git/push.sh | 15 | ||||
-rwxr-xr-x | git/stash-pop.sh | 15 | ||||
-rwxr-xr-x | git/stash.sh | 15 | ||||
-rwxr-xr-x | git/stat.sh | 15 | ||||
-rwxr-xr-x | git/tag.sh | 20 |
8 files changed, 117 insertions, 0 deletions
diff --git a/git/commit.sh b/git/commit.sh new file mode 100755 index 0000000..5c143d4 --- /dev/null +++ b/git/commit.sh @@ -0,0 +1,20 @@ +#! /bin/sh + +# Assume this script never run via PATH. +# +self=`realpath $0` +. `dirname $self`/modules + +if [ "$1" = "" ]; then +echo "missing commit message" 1>&2 +exit 1 +fi + +wd=`pwd` + +for i in $modules; do + cd $i 1>&2 + git add . + git ci -m "$1" + cd $wd +done diff --git a/git/diff.sh b/git/diff.sh new file mode 100755 index 0000000..19737e9 --- /dev/null +++ b/git/diff.sh @@ -0,0 +1,16 @@ +#! /bin/sh + +# Assume this script never run via PATH. +# +self=`realpath $0` +. `dirname $self`/modules + +wd=`pwd` + +for i in $modules; do + echo "diff $i" 1>&2 + cd $i + git --no-pager diff + git --no-pager diff --check + cd $wd +done diff --git a/git/modules b/git/modules new file mode 100644 index 0000000..6f0a4ac --- /dev/null +++ b/git/modules @@ -0,0 +1 @@ +modules="libodb libodb-mysql libodb-tracer libodb-boost odb examples tests etc" diff --git a/git/push.sh b/git/push.sh new file mode 100755 index 0000000..e37d351 --- /dev/null +++ b/git/push.sh @@ -0,0 +1,15 @@ +#! /bin/sh + +# Assume this script never run via PATH. +# +self=`realpath $0` +. `dirname $self`/modules + +wd=`pwd` + +for i in $modules; do + echo "push $i" 1>&2 + cd $i + git push --tags origin master + cd $wd +done diff --git a/git/stash-pop.sh b/git/stash-pop.sh new file mode 100755 index 0000000..be43664 --- /dev/null +++ b/git/stash-pop.sh @@ -0,0 +1,15 @@ +#! /bin/sh + +# Assume this script never run via PATH. +# +self=`realpath $0` +. `dirname $self`/modules + +wd=`pwd` + +for i in $modules; do + echo "stash pop $i" 1>&2 + cd $i + git stash pop + cd $wd +done diff --git a/git/stash.sh b/git/stash.sh new file mode 100755 index 0000000..afc2124 --- /dev/null +++ b/git/stash.sh @@ -0,0 +1,15 @@ +#! /bin/sh + +# Assume this script never run via PATH. +# +self=`realpath $0` +. `dirname $self`/modules + +wd=`pwd` + +for i in $modules; do + echo "stash $i" 1>&2 + cd $i + git stash + cd $wd +done diff --git a/git/stat.sh b/git/stat.sh new file mode 100755 index 0000000..8e90a27 --- /dev/null +++ b/git/stat.sh @@ -0,0 +1,15 @@ +#! /bin/sh + +# Assume this script never run via PATH. +# +self=`realpath $0` +. `dirname $self`/modules + +wd=`pwd` + +for i in $modules; do + echo "stat $i" 1>&2 + cd $i + git stat + cd $wd +done diff --git a/git/tag.sh b/git/tag.sh new file mode 100755 index 0000000..99ba938 --- /dev/null +++ b/git/tag.sh @@ -0,0 +1,20 @@ +#! /bin/sh + +# Assume this script never run via PATH. +# +self=`realpath $0` +. `dirname $self`/modules + +wd=`pwd` + +if [ "$1" = "" ]; then + echo "missing version" 1>&2 + exit 1 +fi + +for i in $modules; do + echo "tag $i" 1>&2 + cd $i + git tag -a $1 -m "Tag version $1" + cd $wd +done |