Accept a name for dl and include starter script file
[khome.git] / home / bin / x
1 #! /bin/sh
2
3 set -e;
4
5 README='README.md'
6
7 name=$(echo "$@" | sed 's/\s\+/-/g');
8 timestamp=$(date +'%F--%H-%M-%S');
9 directory="$HOME/x/$timestamp--$name";
10 mkdir -p "$directory";
11 cd "$directory";
12 printf '%s\n' "$name" > "$README";
13 seq 79 | xargs | sed -E 's/\s*[0-9]+\s*/=/g' >> "$README"
14 git init >&2
15 git commit --allow-empty -m 'Root commit' >&2
16 git add . >&2
17 git commit -m 'Initial commit' >&2
18 echo "$directory";
This page took 0.057126 seconds and 4 git commands to generate.