From eae049ea7beff7715cfd4ceb7df02cbb6e10801e Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Mon, 7 Mar 2022 22:08:47 -0500 Subject: [PATCH] bin: Update demo(1) remove named, saved, output I found the need to name the scripts to be not really useful in the long term--I never re-visited my old demo's and having to name them just kinda slowed down startup! --- bin/demo | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/bin/demo b/bin/demo index 2986946..fcd9268 100755 --- a/bin/demo +++ b/bin/demo @@ -1,19 +1,5 @@ #!/bin/sh # demo -- script(1) wrapper with shell config for better copy/pasta -set -e -die() { - echo "$*" 1>&2 - exit 1 -} - -[ -z "$1" ] && die "usage: demo 'brief description'" - -desc=$(printf "$*" | tr '[[:space:]]' '_') -OUT=$HOME/demo/$desc.script -if [ -e "$OUT" ]; then - die "ERROR: demo file $OUT already exists" -fi - cat </tmp/demo.env export TERM=dumb export PAGER=cat @@ -21,6 +7,5 @@ alias g="echo 'Use the full command during demo(1)!'" PS1='\$ ' EOM -mkdir -p "$HOME/demo" export ENV=/tmp/demo.env -script -c /bin/sh "$OUT" +script -c /bin/sh /tmp/demo.script -- libgit2 1.1.1