Matt McCutchen's Web Site
/
utils
/
utils.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
web-logs/Makefile: Use only the previous day's logs to avoid overlap.
[utils/utils.git]
/
ungitar
1
#!/bin/bash
2
# usage: ungitar foo-dir <foo.gitar
3
4
set -e
5
trap "echo 'Unexpected error!' 1>&2" ERR
6
if ! [ -e "$1" ]; then
7
mkdir "$1"
8
fi
9
cd "$1"
10
11
if [ -e '.git' ]; then
12
echo 'The destination directory is already a git repository!' 1>&2
13
exit 1
14
fi
15
trap "rm -rf .git" EXIT
16
17
ftx .git
18
git read-tree master
19
git checkout-index --all --force