Comments (8)
That would break backwards compatibility as right now the distrobox-init
script itself is mounted inside the container as entry point, and renaming it would break existing distroboxes
For now I see having both option active as the only way, having a distrobox
command that manages subcommands and calls the dedicated scripts so that we have both ways
Then in the future we can think of a migration path
But I would like to maintain the code base as lean as possible, as the main target of the project was also this. Having smaller more readable files, easier to debug and modify
Instead of monolithic scripts of 2-3k LOCs which then will obviously become unmanageable
from distrobox.
@TheEvilSkeleton I would like in the future to do something like this
But I want to maintain backward compatibility and I would like to avoid creating a single shell file with all inside because it would become quite unmanageable and unreadable
Any ideas?
Edit: one thing I like is also that the action of mounting the entry point/init in the container implies only having the init available inside of it, not the whole distrobox which is something I like a bit more
We could come up with a generic distrobox
file that only manages the various subcommands and calls the dedicated files maybe?
from distrobox.
The only idea I have at the moment is making bash act like a compiled language, where all "libraries" (functions and such) get copied and prepended to the main bash script during install.
from distrobox.
You could make distrobox
a wrapper script?
#!/bin/sh
set -eu
COMMAND="$1"
shift
exec distrobox-$COMMAND "$@"
With the added benefit that it handles new commands automatically.
from distrobox.
But I want to maintain backward compatibility and I would like to avoid creating a single shell file with all inside because it would become quite unmanageable and unreadable
I think you should create a sort of library and then use just a single file to avoid code duplication. It's better to have a single tool (in my opinion).
from distrobox.
You could make
distrobox
a wrapper script?#!/bin/sh set -eu COMMAND="$1" shift exec distrobox-$COMMAND "$@"With the added benefit that it handles new commands automatically.
Yep that was the idea
But I want to maintain backward compatibility and I would like to avoid creating a single shell file with all inside because it would become quite unmanageable and unreadable
I think you should create a sort of library and then use just a single file to avoid code duplication. It's better to have a single tool (in my opinion).
The library approach could work in the future, but would break compatibility with existing distroboxes as the entry point is a mount of the distrobix-init
file itself.
A sensible middle approach would be having single/separated files to do the stuff like now
And a distrobox
script that will manage the subcommands (like @manics said)
This would enable also to use simple subcommands for quality of life (list, remove, clone, etc etc)
from distrobox.
Started a first implementation of the wrapper and added a couple of quality of life commands like list
and rm
from distrobox.
I'm merging and closing this, if anyone has suggestions on including other quality of life commands just open a new issue 👍
from distrobox.
Related Issues (20)
- [Error] piping certain output into an empty Fish script results in various Fish errors HOT 3
- [Error] exported apps installed via nix package manager doesn't work HOT 1
- proc_utils.go:194 [error] HOT 1
- [Error] Can't access Raspberry Pi 4 GPIO's in container without sudo HOT 2
- [Error] private: Permission denied: OCI permission denied HOT 1
- distrobox assemble create -n vis fails HOT 2
- Unable to add user to group that only exists in the container. HOT 4
- [Error] Distrobox enter hangs with podman HOT 2
- Default to use a different home directory HOT 14
- [Error] Exported running app icon not showing correctly HOT 9
- [Error] Unable to open any GUI apps on Steamdeck HOT 2
- [Error] Release 1.7.1.0 fails to install HOT 1
- [Error] distrobox-export issues HOT 2
- [Error] using apt install, distrobox crash HOT 6
- [Error] Cannot create any container except Ubuntu HOT 1
- Distrobox crashing on updating containers sporadically[Error] HOT 2
- Security issues, multiple users without a password inside the container and old kernel HOT 2
- [Error] Performance regression when entering big custom homes HOT 1
- Container crashes when installing some applications HOT 4
- [Discussion] Add a guide for running CUPS in distrobox HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from distrobox.