clean up repo

remove some old things like Dockerfile and sandbox/clean scripts, not being used for development
main
Marcus 1 year ago
parent 5105cdf5cb
commit 5df764bb98

@ -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

@ -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: unit-test:
TESTING=true go test -v ./test TESTING=true go test -v ./test
rm -rf test/dotctl_test 2> /dev/null rm -rf test/dotctl_test 2> /dev/null

@ -1,10 +1,11 @@
# Dotctl # Dotctl
A cli tool to manage your dotfiles dotfile management
## About ## About
Dotctl is a tool to help you easily manage your dotfiles and sync them across separate machines using 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 git. It creates a `dotfiles` subdirectory in the user's `$HOME` and provides simple commands to add
updating them with git. and symlink config files/directories to the central `dotfiles` directory.
## Installation ## Installation
@ -16,7 +17,7 @@ clone the repo and run script to build binary and copy it to your path
```sh ```sh
git clone https://github.com/Marcusk19/dotctl.git git clone https://github.com/Marcusk19/dotctl.git
cd dotcl cd dotctl
make install make install
``` ```
@ -29,29 +30,19 @@ dotctl init
dotctl add ~/.config/nvim dotctl add ~/.config/nvim
# create symlinks # create symlinks
dotctl link dotctl link
# sync
dotctl sync -r <remote-repo>
``` ```
### 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 dotctl comes with a `sync` command that performs the following operations for the dotfiles directory:
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.
```bash 1. pulls changes from configured upstream git repo
make sandbox # creates the directory and copies over from ~/.config 2. commits and pushes any changes detected in the dotfile repo
make clean # removes directory
```
### Docker set the upstream repo using the `-r` flag or manually edit the config at `$HOME/dotfiles/dotctl/config.yaml`
You can also run the docker container that will set up a barebones shell for you
to test dotctl with
```sh example usage:
docker built -d dotctl-dev . ```
docker run -it dotctl-dev dotctl sync -r https://github.com/example/dotfiles.git
dotctl status
``` ```

Loading…
Cancel
Save