Skip to content

Commit

Permalink
make gird --version work
Browse files Browse the repository at this point in the history
  • Loading branch information
bronson committed Jul 29, 2020
1 parent 2856150 commit 91edf50
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ a file named Girdsums. All subdirectories are processed too.
Later, Gird can check these hashes and verify that the contents of
the files are identical to when they were first girded.

## BRAND NEW BRAND NEW BRAND NEW

Don't use this repo yet

## Installation

Copy the `gird` file somewhere on your path.
Expand Down
3 changes: 3 additions & 0 deletions gird
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# If the directory contents are different, PRINT A PANIC
# If any file digests have changed, PRINT A PANIC

version=0.9

gird_directory () {
die () {
echo "$@" >&2
Expand Down Expand Up @@ -106,6 +108,7 @@ while [ "$#" -gt 0 ]; do
-i|--init) forcemode='initializing'; shift;;
-s|--verify|--scan) forcemode='verifying'; shift;;
-c|--continue) should_continue=1; shift;;
--version) echo "Gird $version"; exit;;
# --pidfile=*) pidfile="${1#*=}"; shift 1;;
# --pidfile) echo "$1 requires an argument" >&2; exit 1;;
-*) echo "unknown option: $1" >&2; exit 1;;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions t/4-logistics.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

test_description="Ensures the busywork gets done"

. sharness.sh

test_expect_success "Can retrieve the current version" "
gird --version > stdout &&
grep -q '^Gird [0-9.]*$' stdout &&
[ ! -e Girdsums ] &&
rm stdout
"

test_done

0 comments on commit 91edf50

Please sign in to comment.