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

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

Loading…
Cancel
Save