Skip to content

Create Setup Validation Script #31

@andrewwoods

Description

@andrewwoods

Description

As Opal improves over time, features get added. Sometimes, those features require a certain file or directory to exist. This script would examine the users' setup. If something is missing, the script would create it.

Expected Outcome

An executable, non-destructive, script in the opal/bin directory that validates that everything Opal needs, is available. Nothing should be over-written or deleted. The only dependency of this script is opal/core.bash file. The whole framework should not be loaded just to run this script.

The script should display to the user a label of what is being checked.
If something is already there, display Found. If somethng needs to be created, display Added, so the user knows an action was taken.

Example Output

$HOME/opal/bin is in $PATH ....... Found
$HOME/.local/bin is in $PATH ..... Found
$HOME/.bashrc .................... Found
$HOME/.bash_profile .............. Found
$HOME/.vimrc ..................... Found
$HOME/.config/nvim/init.lua ...... Added

The only args that need support are -h | --help to display a help message, to show how to run the script.

Describe alternatives you've considered

I considered making this a single function, but a separate script is more flexible and robust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TaskA normal ticket

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions