diff --git a/README.md b/README.md new file mode 100644 index 0000000..a31e5c2 --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +# Description +A tool to help keeping your system up to date. + +This tool will remember the applications you installed and update them all (even from a git repo). To do that you will need to configure all the commands you want to run when upgrating your system (see the `example_config` folder). + +See also [topgrade](https://github.com/topgrade-rs/topgrade) for a solution that auto-detect everything it can. + +# Roadmap +[X] Run commands found in different configuration files +[X] Have Pre / Post commands to do before / after the upgrade +[X] Do all the installations and give a summary of success and errors at the end +[X] Improve errors ^^' +[ ] Executors from a packagers need to be executed in order and only if all of the previous failed +[ ] Tests +[ ] Prevent the usage of `sudo` and equivalent, add a config to say "needAdminRights" +[ ] Parallel execution of commands + [ ] Packagers need to state their dependency + [ ] Show a progress bar general and the list of task in execution (with their stepNumber): "helix PostInstall (1/2)" + [ ] All input should be prevented (even asking for `sudo`’s password) + [ ] All output (standard and errors) needs to be redirected in files. Maybe something like: /tmp/system-updater/--.log +[ ] Start self and command "Nicer" (Not sure it is possible in all systems, or in the same way) +[ ] Documentation + [X] Readme + [ ] Code + +## Nice to have +[ ] Being usable as a lib (I set the minimum possible in main.rs but the insterface have not been thought out) +[ ] Have subcommands to interactively act on packagers’s config + [ ] List + [ ] Show + [ ] Create + [ ] Delete + [ ] Update? (Bad way: Show + Delete + Create? ^^') +[ ] More config examples + [ ] System executors for all/most famous systems (openSUSE, Fedora, Arch, …) + [ ] At least an example of binary downlowd (curl or wget) + +# Usage +The configuration folder is at [the standard path for configuration on your system](https://docs.rs/directories/latest/directories/struct.ProjectDirs.html#method.config_dir) and the commads should be in the packagers subfolder. +Example on linux it is at `~/.config/systemupdater/packagers/` + +Just start the program, no option needed in you day to day usage. +```sh +sup +``` + +# Installation +```sh +cargo install --locked system-updater +``` diff --git a/examples/apt.yaml b/example_configss/apt.yaml similarity index 100% rename from examples/apt.yaml rename to example_configss/apt.yaml diff --git a/examples/flatpack.yaml b/example_configss/flatpack.yaml similarity index 100% rename from examples/flatpack.yaml rename to example_configss/flatpack.yaml diff --git a/examples/git-helix.yaml b/example_configss/git-helix.yaml similarity index 100% rename from examples/git-helix.yaml rename to example_configss/git-helix.yaml diff --git a/examples/pipx.yaml b/example_configss/pipx.yaml similarity index 100% rename from examples/pipx.yaml rename to example_configss/pipx.yaml diff --git a/examples/rust.yaml b/example_configss/rust.yaml similarity index 100% rename from examples/rust.yaml rename to example_configss/rust.yaml diff --git a/src/command.rs b/src/command.rs index 46d4d09..9d98f72 100644 --- a/src/command.rs +++ b/src/command.rs @@ -92,7 +92,7 @@ pub fn get_packages_folder(opt: &Opt) -> io::Result { "System’s configuration folder: for its standard location see https://docs.rs/directories/latest/directories/struct.ProjectDirs.html#method.config_dir", ))? .config_dir() - .join("packages"); + .join("packagers"); Ok(config_folder) }