Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
onurozuduru committed Feb 28, 2024
1 parent 07745ac commit 1a7da54
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
# dothome
Simple dot files manager bash script
Simple dot files manager script that requires Bash version 4 or higher.

```bash
Usage: ./dothome [ -b | --base <DIR> ] [ -d | --dotfiles <NAME> ] [ -n | --new ] [ -i | --init ] [ -a | --add <FILE> ] [ -h | --help ]
Simple dot files manager.
-b,--base <DIR> Base directory to use for operations. Default: '/home/onur'
-d,--dotfiles <NAME> Name of a directory relative to base directory to use for operations. Default: 'dotfiles'
-n,--new Create new dot files directory under base directory.
-i,--init Link files from dot files directory to their relative locations under base directory.
-a,--add <FILE> Move given file to dot files directory and create link under base directory.
-h,--help Display help.
```

## How It Works
It uses `${HOME}` as default base directory and takes with `-d` a relative directory name to use as dot files directory.
Basically reflects the home folder structure under dot files directory and links related files to their dot files directory version.
Converts names start with '.' to a version starts with 'dot.' under dot files to not having hidden files under dot files.

### New
Creates a new dot files directory.

### Add
Moves given file to dot files directory then creates link to the original location.
The moved version of the file starts with 'dot.' if it starts with '.'

### Init
Creates links relative to dot files location under base directory.
If there is already created dot files then it is possible to link files under home with this option.

0 comments on commit 1a7da54

Please sign in to comment.