Commit | Line | Data |
---|---|---|
64ec9f23 SK |
1 | #! /bin/sh |
2 | ||
3 | set -e; | |
4 | ||
0443168a | 5 | name=$(echo "$@" | sed 's/\s\+/-/g'); |
3690e807 SK |
6 | timestamp=$(date +'%F--%H-%M-%S'); |
7 | directory="$HOME/x/$timestamp--$name"; | |
8 | mkdir -p "$directory"; | |
9 | cd "$directory"; | |
10 | printf '# %s\n' "$name" > README; | |
11 | git init >&2 | |
12 | git commit --allow-empty -m 'Root commit' >&2 | |
13 | git add . >&2 | |
14 | git commit -m 'Initial commit' >&2 | |
15 | echo "$directory"; |