X-Git-Url: https://git.xandkar.net/?p=khome.git;a=blobdiff_plain;f=home%2Fbin%2Fx;fp=home%2Fbin%2Fx;h=16871145950f7d5b6c9e724260319da59ebcaafb;hp=1b04be62685a44a0f1925c2a35992bfea2d590b9;hb=3452aeb7711351462e333efd9610fad5795472f4;hpb=88f8cf208bcf23171d40399ea2fc8337ddba3f89 diff --git a/home/bin/x b/home/bin/x index 1b04be6..1687114 100755 --- a/home/bin/x +++ b/home/bin/x @@ -2,12 +2,15 @@ set -e; +README='README.md' + name=$(echo "$@" | sed 's/\s\+/-/g'); timestamp=$(date +'%F--%H-%M-%S'); directory="$HOME/x/$timestamp--$name"; mkdir -p "$directory"; cd "$directory"; -printf '# %s\n' "$name" > README; +printf '%s\n' "$name" > "$README"; +seq 80 | xargs | sed -E 's/\s*[0-9]+\s*/=/g' >> "$README" git init >&2 git commit --allow-empty -m 'Root commit' >&2 git add . >&2