tux icon indicating copy to clipboard operation
tux copied to clipboard

Create setup.sh to provide a fast and seamless local dev environment

Open kzndotsh opened this issue 1 year ago • 7 comments

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

kzndotsh avatar Aug 24 '24 22:08 kzndotsh

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

kzndotsh avatar Aug 24 '24 22:08 kzndotsh

If this use does not have Python installed, we could potentially opt in to provide it via https://mise.jdx.dev

kzndotsh avatar Aug 24 '24 22:08 kzndotsh

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

kzndotsh avatar Aug 24 '24 22:08 kzndotsh

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.

HikariNee avatar Aug 26 '24 07:08 HikariNee

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 +

HikariNee avatar Aug 26 '24 07:08 HikariNee

That's fair, check out general chat of the dev server for some recent discussion about this issue.

kzndotsh avatar Aug 26 '24 07:08 kzndotsh

maybe we can focus on containerized development of tux and setup.sh just generates the config files and the docker compose

electron271 avatar Aug 26 '24 17:08 electron271