Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

setup/teardown

  • Loading branch information...
commit 5c2f0a55daec5972118f9056a3f236d8542e0946 1 parent c5d99ae
Thomas Levine authored
5 test/setup
... ... @@ -1,4 +1,7 @@
1 1 #!/bin/sh
2 2
3   -rm -f ~/.git-achievements*
  3 +# Make a temporary directory.
4 4 mkdir -p ./.tmp
  5 +
  6 +# Clear git-achievements files
  7 +rm -f ~/.git-achievements{-action,}.log
8 test/setup_dir
... ... @@ -0,0 +1,8 @@
  1 +#!/bin/sh
  2 +
  3 +# Back up and clear current achievements.
  4 +for file in ~/.git-achievements.log ~/.git-achievements-action.log
  5 + do
  6 + [ -e "$file" ] && mv $file{,.bak}
  7 +done
  8 +
2  test/teardown 100755 → 100644
... ... @@ -1,3 +1,3 @@
1 1 #!/bin/sh
2 2
3   -rm -Rf ./.tmp
  3 +rm -Rf .tmp
12 test/teardown_dir
... ... @@ -0,0 +1,12 @@
  1 +#!/bin/sh
  2 +
  3 +# Restore achievements
  4 +for file in ~/.git-achievements.log ~/.git-achievements-action.log
  5 + do
  6 + if [ -e "${file}.bak" ]
  7 + then
  8 + mv $file{.bak,}
  9 + else
  10 + rm $file
  11 + fi
  12 +done

0 comments on commit 5c2f0a5

Please sign in to comment.
Something went wrong with that request. Please try again.