Commit graph

7 commits

Author SHA1 Message Date
18c16917b2 App, .cmds.Cmd: Add .distro property

DistroBase's option --id is now redundant to the new global option --distro-id in the App class, so remove --id. The only added value DistroBase then brings to the table is its .distro property, which can be provided by App just fine at this point, given that App has all it needs to construct a Distro object, so add .distro to App and remove the entire DistroBase class.

For convenience, also make App.distro available as a newly added cmds.Cmd.distro property. This also obviates the need for the distro-related properties in the .distro.Cmd class, remove all that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-07 14:35:54 +01:00
f94a2ac037 cmds.DistroBase: Add class

Move most of CmdDistro into the new class DistroBase, meant to serve as base class for distro-aware commands other than "distro".

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-06 12:06:28 +01:00
c8036ad216 jw-pkg.sh: Print help for missing subcommands

Print a help message if no subcommand is specified for one of the comamnds "distro" and "projects".

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-24 14:52:25 +01:00
26e739ca0d src.python.jw.pkg.App: Add property distro_id

Add @property App.distro_id, returning the ID field of /etc/os-release. It is supposed to be the most specific part of the OS cascade.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-15 16:13:21 +00:00
75041d5505 src/python/jw/pkg/cmds/CmdDistro: Fix ID regex

The ID regex on /etc/os-release also matches ID_LIKE, which is obviously nonsense. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-14 20:58:33 +01:00
e075e8902b jw.pkg.cmds.CmdDistro: Default --interactive to true

Better safe than sorry: If things are to happen unattendedly, enforce the need to explicitly request that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-29 11:32:32 +01:00
ad45ee8510 jw.pkg.cmds.distro: Add directory

Add the subdirectory structure for the distro subcommand.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-28 18:08:48 +01:00