From 5df764bb981873b9f22341bd5f723decec5dcddc Mon Sep 17 00:00:00 2001 From: Marcus Date: Sun, 15 Dec 2024 15:48:44 -0500 Subject: [PATCH] clean up repo remove some old things like Dockerfile and sandbox/clean scripts, not being used for development --- Dockerfile | 10 ---------- Makefile | 8 -------- README.md | 39 +++++++++++++++------------------------ 3 files changed, 15 insertions(+), 42 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 9a1e047..0000000 --- a/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM golang:1.21.12 -RUN apt-get update && \ - apt-get install -y git neovim make -WORKDIR /app -COPY go.mod go.sum / -RUN go mod download -COPY . . -RUN make install -ENTRYPOINT sh - diff --git a/Makefile b/Makefile index 673de8d..36443cf 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,3 @@ -clean: - rm -rf test/dotctl_test 2> /dev/null - rm -rf tmp 2> /dev/null - -sandbox: - mkdir -p ./tmp/ 2> /dev/null - cp -r ~/.config/ ./tmp/config 2> /dev/null - unit-test: TESTING=true go test -v ./test rm -rf test/dotctl_test 2> /dev/null diff --git a/README.md b/README.md index 2297e6e..0c09e2f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ # Dotctl -A cli tool to manage your dotfiles +dotfile management ## About Dotctl is a tool to help you easily manage your dotfiles and sync them across separate machines using -git. It aims to abstract away the manual effort of symlinking your dotfiles to config directories and -updating them with git. +git. It creates a `dotfiles` subdirectory in the user's `$HOME` and provides simple commands to add +and symlink config files/directories to the central `dotfiles` directory. + ## Installation @@ -16,7 +17,7 @@ clone the repo and run script to build binary and copy it to your path ```sh git clone https://github.com/Marcusk19/dotctl.git -cd dotcl +cd dotctl make install ``` @@ -29,29 +30,19 @@ dotctl init dotctl add ~/.config/nvim # create symlinks dotctl link -# sync -dotctl sync -r ``` +### Syncing to git +_Warning: using the sync command can have some unexpected behavior, currently the recommendation +is to manually track the dotfiles with git_ -## Development -It's preferable to create a temporary directory and copy your system's config -directory over to avoid making undesirable changes to your system. -A couple of useful makefile scripts exist to set up and tear down this. -It will create a testing directory in `./tmp/config` and copy your system configs -over. +dotctl comes with a `sync` command that performs the following operations for the dotfiles directory: -```bash -make sandbox # creates the directory and copies over from ~/.config -make clean # removes directory -``` +1. pulls changes from configured upstream git repo +2. commits and pushes any changes detected in the dotfile repo -### Docker -You can also run the docker container that will set up a barebones shell for you -to test dotctl with +set the upstream repo using the `-r` flag or manually edit the config at `$HOME/dotfiles/dotctl/config.yaml` -```sh -docker built -d dotctl-dev . -docker run -it dotctl-dev -dotctl status +example usage: +``` +dotctl sync -r https://github.com/example/dotfiles.git ``` -