From: Edward Delaporte Date: Mon, 6 Jul 2026 02:42:12 +0000 (-0500) Subject: WIP dotfile manager with Ansible X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/commitdiff_plain/556d7d251b9b7712b69ecf804293e9df7cef1c19?ds=inline WIP dotfile manager with Ansible --- diff --git a/bin/dot b/bin/dot new file mode 100755 index 0000000..a59d80d --- /dev/null +++ b/bin/dot @@ -0,0 +1,50 @@ +#!/bin/bash +# dot - a (mostly) one script dotfiles manager +# +# Copyright 2026 Edward Delaporte V +# Licensed under AGPLv3 and later. +# +# Features +# symlinks - any file in $HOME/dotfiles/files may be symlinked +# +# dot setup +# install the necessary tools to $HOME/envs/dot +# +# dot list +# list available roles +# +# dot check +# check setup vs expected +# +# dot add ROLE +# add ROLE to localhost +# +# dot apply +# apply all added ROLES + +# set -v +# +if [ "$1" == "setup" ]; then + if [[ ! -d $HOME/envs/ansible ]]; then + mkdir -p "$HOME/envs" + echo "Setting up Ansible in ~/envs/ansible" + cd $HOME/envs; python3 -m venv ansible + $HOME/envs/ansible/bin/pip install ansible + fi + if [[ -d $HOME/envs/ansible ]]; then + echo "[ ok ]: ~/envs/ansible" + fi +fi + +if [ "$1" == "check" ]; then + echo "check" +fi + +if [ "$1" == "list" ]; then + echo "May symlink:" + cd $HOME/dotfiles/files + ls -p | grep -v / + + +fi +