There are a few common things I end up doing in all my projects, independent of the programming language I use. One of them is a text file with notes, TODOs, and design ideas. The other is a task file.

A task file is shell script with a collection of commands that I use to build, test, sync and do whatever else is needed for the project. Think of it as a mix of an annotated bash history of the project and a Makefile.

Skeleton

A task file is in the root of the project, and this is the basic skeleton of one:

#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

# add functions here...

function help {
echo "$0 <task> <args>"
echo "Tasks:"
compgen -A function | grep -v "^_" | cat -n
}

"${@:-help}"

Let’s go through the relevant lines.

set -euo pipefail

sets 3 op…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help