summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
Diffstat (limited to 'git')
-rwxr-xr-xgit/commit.sh20
-rwxr-xr-xgit/diff.sh16
-rw-r--r--git/modules1
-rwxr-xr-xgit/push.sh15
-rwxr-xr-xgit/stash-pop.sh15
-rwxr-xr-xgit/stash.sh15
-rwxr-xr-xgit/stat.sh15
-rwxr-xr-xgit/tag.sh20
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