1b04be62685a44a0f1925c2a35992bfea2d590b9
[khome.git] / home / bin / x
1 #! /bin/sh
2
3 set -e;
4
5 name=$(echo "$@" | sed 's/\s\+/-/g');
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";
This page took 0.06243 seconds and 3 git commands to generate.