aboutsummaryrefslogtreecommitdiff
path: root/include/mktd.mi5
blob: 388eb9be83d90435591cccbd33c4d2c4f4680d6f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Create a temporary directory with name in $td, and handle POSIX-ish traps to
# remove it when the script exits.
td=
cleanup() {
    [ -n "$td" ] && rm -fr -- "$td"
    if [ "$1" != EXIT ] ; then
        trap - "$1"
        kill "-$1" "$$"
    fi
}
for sig in EXIT HUP INT TERM ; do
    # shellcheck disable=SC2064
    trap "cleanup $sig" "$sig"
done
td=$(mktd "$self") || exit
lor: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#env
# -d: Don't cry if the terminal sucks
# -i: Case-insensitive search for all-lowercase terms
# -Q: Never ring a bell
# -R: Read ANSI colours
LESS = -diQR
# Don't keep history
LESSHISTFILE = -