Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor installer to support offline installs and more control over user data #361

Merged
merged 1 commit into from
Aug 8, 2016

Conversation

sagebind
Copy link
Member

Completely refactors the installer. The code is more organized and should be more reliable and consistent.

The new installer supports:

@sagebind sagebind added type:improvement installer Related to installer script labels Jul 13, 2016
@sagebind sagebind added this to the v3 milestone Jul 13, 2016
@sagebind sagebind self-assigned this Jul 13, 2016

return (test $major = $OMF_FISH_MIN_VER[1] -a $minor -ge $OMF_FISH_MIN_VER[2])
# Add an exit hook to display a message if the installer aborts or errors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool idea!

@derekstavis
Copy link
Member

What about using http://get.oh-my.fish URL?

@derekstavis
Copy link
Member

Still missing is the uninstall method compatible with fish 2.3.
Making omf destroy call bin/install --uninstall would do the trick :)

@derekstavis
Copy link
Member

When installing to a path using fish install --offline=/tmp and the source isn't found, I get some weird messages 👀

@sagebind
Copy link
Member Author

@derekstavis Good suggestions. I just pushed an update that includes/fixes all of them! 👍


set -q CI; or exec fish < /dev/tty
# Start a new OMF-free shell
exec fish < /dev/tty
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this cause an issue with Travis?

@sagebind sagebind force-pushed the installer-refactor branch 2 times, most recently from d025fec to 0af1a01 Compare July 24, 2016 04:43
is_install_dir "$OMF_PATH"
or abort "No installation detected at $OMF_PATH"

say "Warning: This will uninstall Oh My Fish and all plugins and themes installed in $OMF_PATH. Your configuration will not be modified. You will need to remove any Oh My Fish startup code from $FISH_CONFIG/config.fish."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could add some space between the messages:

Warning: This will uninstall Oh My Fish and all plugins and
themes installed in /Users/derek/.local/share/omf.

Your configuration will not be modified. You will need to remove any
Oh My Fish startup code from /Users/derek/.config/fish/config.fish.

And also use bold in the last paragraph

Refactor the installer to be more maintainable and interactive. The installer is now more robust and safe in its operation, and asks interactive questions for choices that the user must resolve. Setting up confuguration is also now changed to take advantage of Fish 2.3 features and does not mess with user's configuration files without permission.

- Make installer smarter and use uninstaller in destroy
- Better handling and checking for offline installs
- `omf destroy` simply uses `install --uninstall`
- Final warning message is no longer displayed when user intentionally aborts install
- Backups are restored during uninstall
- Update the README to detail the new ways to install OMF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installer Related to installer script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants