Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Shell scripts to support git version management

  • Loading branch information...
commit a65880dd2c05cdcd3dce7f7e6cc4aef3b2535b30 1 parent fdf0196
@tomfaulhaber authored
Showing with 41 additions and 0 deletions.
  1. +23 −0 is-uptodate.sh
  2. +18 −0 update-last.sh
View
23 is-uptodate.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]
+then
+ echo "Usage: is-uptodate.sh src-directory"
+ exit 1
+fi
+
+srcdir=$1
+
+cd $srcdir
+
+commit=`git log -1 | awk '/^commit/ {print $2;}'`
+lastcommit=`cat ../last-seen-revision`
+
+if [ "$commit" = "$lastcommit" ]
+then
+ echo yes
+else
+ echo no
+fi
+
+exit 0
View
18 update-last.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+if [ $# -ne 1 ]
+then
+ echo "Usage: update-last.sh src-directory"
+ exit 1
+fi
+
+srcdir=$1
+
+cd $srcdir
+
+commit=`git log -1 | awk '/^commit/ {print $2;}'`
+lastcommit=`cat ../last-seen-revision`
+
+echo $commit > ../last-seen-revision
+
+exit 0
Please sign in to comment.
Something went wrong with that request. Please try again.