-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Update scripts and README for clarity and options
- bootstrap: Rename `1st` script to `bootstrap` for clarity - back: Add basic, all options and update option usage - setup: Add basic option and update option usage and Rename `setup.zsh` to `setup` for conciseness - README.md: Update to clarify usage of backup and restore scriptsj
- Loading branch information
Showing
6 changed files
with
321 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,76 @@ | ||
# Dotfiles for Backup and Restore | ||
|
||
This repository is designed to back up Mac configuration files (dotfiles), other settings, plugins, and scripts used for installation and convenience. Most of the files here are automatically saved and synced to Dropbox, so these files are optional backups. The following instructions include steps for restoring files from Dropbox as well. | ||
|
||
|
||
## Backup | ||
|
||
To back up your environment, use the back command with `rsync`. `rsync` can be installed via Homebrew. The command format is: | ||
|
||
``` | ||
$ back _<option> | ||
``` | ||
If command | ||
$ back _<tool> | ||
``` | ||
$ back _all | ||
For detailed usage of the back command, refer to the following help message: | ||
``` | ||
backup zsh, vim, tmux, git, fzf, nodejs, py, brew, etc, karabiner | ||
$ back help | ||
Usage: back [OPTIONS] [GROUP_NAME] | ||
`_all` is not contain rclone and gdb | ||
Back up the specified dotfile groups to the dotfiles repository using rsync with -azvhrubRL options. | ||
### other option | ||
Groups: | ||
_git, _brew, _zsh, _vim, _fzf, _tmux, _gdb, _yarn, _python, _karabiner | ||
Options: | ||
-A, --all, all Back up all groups | ||
-B, --basic, basic Back up a predefined set of essential groups | ||
(git, brew, zsh, vim, fzf, tmux, karabiner) | ||
``` | ||
|
||
option: zsh, vim, tmux, git, fzf, nodejs, py, brew, etc, karabiner, rclone, gdb | ||
|
||
## Restore | ||
|
||
First, | ||
To restore, run `bootstrap` and `setup`, which internally rely on `mackup` and `stow` for the restoration process. `mackup` and `stow` are installed as part of the `bootstrap` process, so there is no need to install them separately. Both tools can be installed via Homebrew." | ||
|
||
To restore your environment, follow these steps: | ||
|
||
1. Install essential tools and software: | ||
|
||
``` | ||
$ 1st _install | ||
$ bootstrap | ||
``` | ||
then, install brew, oh-my-zsh and nvm, yarn, | ||
set git config | ||
|
||
Second, restore. There are two option | ||
This will install Homebrew and reinstall all previously managed software using Homebrew. Next, run 'mackup restore' to restore settings such as .vimrc and other dotfiles related to git, zsh, vim, and others. Also, install oh-my-zsh, nodejs and yarn. | ||
Currently, the software may be set to use either specific versions or the latest versions, depending on the setup. It would be beneficial to allow for selection between these options in the future. | ||
|
||
1) Restore all from **Dropbox** using Mackup | ||
2. Selectively restore **dotfiles**: | ||
|
||
``` | ||
$ mackup restore | ||
``` | ||
2) Selectively restore from **dotfiles** using stow by script | ||
Use the `setup` command to create symbolic links for dotfiles, or alternatively, copy them individually using `stow`, `rsync` or other methods. | ||
|
||
``` | ||
$ setup.zsh | ||
$ setup _<tools> | ||
``` | ||
|
||
To learn more about using the back command, check the help option: | ||
``` | ||
$ setup -h | ||
Usage: setup [OPTIONS] [GROUP_NAME]... | ||
Restore specified dotfile groups using stow. Groups are symlinked to $HOME. | ||
Multiple groups can be listed separated by spaces. | ||
Use 'setup --basic' or 'setup -B' for a predefined set of essential groups. | ||
Groups: | ||
_vim, _zsh, _tmux, _git, _gdb, _fzf, _yarn, _python, _karabiner, _rclone | ||
Options: | ||
-B, --basic, basic Restore a predefined set of essential groups | ||
(_vim, _zsh, term) | ||
Example: | ||
setup _vim _zsh _tmux # Restores vim, zsh, and tmux configurations | ||
setup -B # Restores the basic configuration groups | ||
``` | ||
|
||
|
||
|
||
Each folder in this repo is structured for use with `stow`. Some files, like those in dotfiles, are stored both in Dropbox and in this repository, allowing you to choose the source for restoration. However, currently, `1st` prioritizes fetching files from Dropbox first due to considerations for installation order and synchronization convenience. This means that symbolic links are created for files found in Dropbox. If a file is not present in Dropbox—whether intentionally omitted or missing—it will be obtained from the dotfiles repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.