`customizer.sh` endpoint capabilities
Capabilities
- We will be using the flags of the customizer core to keep the state of the flags that we want to pass to each call.
- Move wrappers to the endpoint.
- The endpoint recognizes and uses the same args and flags as the installers, so a -v at customizer endpoint level will be passed to each call of the backend.
customizer.sh modes
- install
- uninstall
- parallel
- status
- update: git fetch
- upgrade: git pull
Argument specification.
Main
Import functions common ()
Locate install uninstall scripts()
Process initial args and set flags()
Choose algorithm based on initial args()
Init call strings depending on algortihm()
Process rest of args()
String callString = Process call()
Exec $callString
Args:
They choose the general behaviour of how the arguments will be translated to calls to the backend scripts of the customizer.sh endpoint.
-
--sudo,--user,--deduce-privilegesBy default uses--deduce-privileges, which makes the call to backend customizer withsudoonly if required. If--userthen all calls will be non privileged. Otherwise with--sudo. -
--maximize-calls,--optimize-calls,--minimize-callsBy default uses--optimize-calls, which appends to the current string call if the mode has not changed. If the mode changes then the call of the current mode finishes and the string is appended to the final call string. This mode respects strictly the order of the installations.--maximize-callsappends the current call string to the final call string every time a feature is processed in the arguments. This mode respects strictly the order of the installations.--minimize-callsuses at maximum four calls, one for each mode if needed. The order will be starting with sudo uninstall, followed by sudo install and then uninstall and install. -
--foreground,--backgroundBy default--foreground, which executes the final call while trapping your prompt--backgroundAdds a & to the final call in order to make it in the background and get the prompt as soon as the final call is issued. -
--sequential,--safe-sequential,--parallel=bash,--parallel=gnome-terminal,--parallel=gnu, By default--safe-sequentialwhich appends the calls using&&--sequentialuses;to append the calls to each other--parallel=bashappends the call using&, so each call is made parallel in the same terminal.--parallel=gnome-terminalappends the call as argument to a call tognome-terminalin background--parallel=gnuuses gnu parallel to run each call as a call to be done by parallel. -
--handle-dependencies,--ignore-dependenciesBy default--handle-dependencies, which applies only when installing obligated user features that have root dependencies. In those cases, if any of the dependencies is not present, the call will be converted to a sudo call with the--dependencies(to be implemented) argument to install the dependencies only, and the subsequent user call to install the feature.--ignore-dependenciestreats each feature as is
https://stackoverflow.com/questions/8861673/run-a-command-without-privileges-in-a-root-shell
This can be used to control the customizer with and without privileges