Add screencast script
[khome.git] / home / bin / x
CommitLineData
64ec9f23
SK
1#! /bin/sh
2
3set -e;
4
0443168a 5name=$(echo "$@" | sed 's/\s\+/-/g');
64ec9f23
SK
6
7if [ "$name" != "" ];
8then
807bbf47 9 timestamp=$(date +'%F--%H-%M-%S');
a42aa7f8 10 directory="$HOME/x/$timestamp--$name";
64ec9f23
SK
11 mkdir -p "$directory";
12 cd "$directory";
0443168a 13 printf '# %s\n' "$name" > README;
64ec9f23 14 git init >&2
dcc0170d 15 git commit --allow-empty -m 'Root commit' >&2
64ec9f23
SK
16 git add . >&2
17 git commit -m 'Initial commit' >&2
18 echo "$directory";
19else
20 echo "Please give the experiment a name, as the first argument.";
21 exit 1;
22fi;
This page took 0.092749 seconds and 4 git commands to generate.