Create setup.sh to provide a fast and seamless local dev environment
See https://github.com/allthingslinux/tux/blob/setup/setup.sh
Some notes/things to consider:
- Find good examples of bash boilerplate/templates for setup scripts
- We need to ensure we account for various shells/terminals
- We need to ensure we account for various distros/package managers
- Ideally, it will be interactive and take in user input for some things e.g. user ID, prefix
- If something errors out, it should report back why and how to resolve it.
Linting/formatting/testing utils?
- https://github.com/koalaman/shellcheck
- https://github.com/mvdan/sh (includes shfmt)
- https://github.com/bats-core/bats-core
We could possibly even install Poetry for the user if not available via this script which installs Poetry in a "sandbox" manner: https://github.com/python-poetry/install.python-poetry.org
If this use does not have Python installed, we could potentially opt in to provide it via https://mise.jdx.dev
Boilerplate inspiration and other cool stuff:
- https://github.com/dylanaraps/pure-bash-bible
- https://github.com/ralish/bash-script-template
- https://github.com/onceupon/Bash-Oneliner
- https://github.com/natelandau/shell-scripting-templates
- https://github.com/hedzr/bash.sh
- https://github.com/kvz/bash3boilerplate
- https://github.com/xwmx/bash-boilerplate
- https://github.com/alebcay/awesome-shell
- https://github.com/awesome-lists/awesome-bash
- https://github.com/denysdovhan/bash-handbook
- https://github.com/alexanderepstein/Bash-Snippets
- https://github.com/charmbracelet/gum
I don't think we should handle the cases of them not having Poetry or Python installed.
Doing this in a distro-agnostic way that works everywhere is a very big task.
The simplest script we can have is one that installs docker and runs Tux in there. Also stops the global namespace pollution so that's also a +
That's fair, check out general chat of the dev server for some recent discussion about this issue.
maybe we can focus on containerized development of tux and setup.sh just generates the config files and the docker compose