diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-02 12:16:38 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-02 12:16:38 -0500 |
| commit | b10cba594db836c0747066addad48bda4d30cd02 (patch) | |
| tree | 063119a623fa3f7139feda4ef302896d8f5f934c /dotfiles/common/.local/bin/msmtp-runqueue.sh | |
| parent | 49c2ba9c4510bf6e1acd306687473bc8ba9ad8dd (diff) | |
| download | archsetup-b10cba594db836c0747066addad48bda4d30cd02.tar.gz archsetup-b10cba594db836c0747066addad48bda4d30cd02.zip | |
refactor: drop in-repo dotfiles/, move stow tooling to the dotfiles repo
Since the installer clones DOTFILES_REPO into ~/.dotfiles and stows from there, the in-repo dotfiles/ tree was dead weight. Nothing reads it at install time. I removed it (831 files) now that both machines are migrated.
The Makefile's stow / restow / reset / unstow / import targets and the dotfile-script unit suites moved to the dotfiles repo. They sit alongside the scripts they manage and run standalone (cd ~/.dotfiles && make ...). This Makefile keeps the VM-integration targets and the installer-helper suite (safe-rm-rf).
I updated CLAUDE.md and README.md so stow operations run from ~/.dotfiles, and the dotfile-management, theme, and unit-test sections point at the standalone repo. The README was already describing the old in-repo model from before the installer switched to cloning. This brings it in line.
Diffstat (limited to 'dotfiles/common/.local/bin/msmtp-runqueue.sh')
| -rwxr-xr-x | dotfiles/common/.local/bin/msmtp-runqueue.sh | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/dotfiles/common/.local/bin/msmtp-runqueue.sh b/dotfiles/common/.local/bin/msmtp-runqueue.sh deleted file mode 100755 index 1200610..0000000 --- a/dotfiles/common/.local/bin/msmtp-runqueue.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env sh - -QUEUEDIR="$HOME/.msmtpqueue" -LOCKFILE="$QUEUEDIR/.lock" -MAXWAIT=120 - -OPTIONS=$* - -# eat some options that would cause msmtp to return 0 without sendmail mail -case "$OPTIONS" in - *--help*) - echo "$0: send mails in $QUEUEDIR" - echo "Options are passed to msmtp" - exit 0 - ;; - *--version*) - echo "$0: unknown version" - exit 0 - ;; -esac - -# wait for a lock that another instance has set -WAIT=0 -while [ -e "$LOCKFILE" ] && [ "$WAIT" -lt "$MAXWAIT" ]; do - sleep 1 - WAIT="$((WAIT + 1))" -done -if [ -e "$LOCKFILE" ]; then - echo "Cannot use $QUEUEDIR: waited $MAXWAIT seconds for" - echo "lockfile $LOCKFILE to vanish, giving up." - echo "If you are sure that no other instance of this script is" - echo "running, then delete the lock file." - exit 1 -fi - -# change into $QUEUEDIR -cd "$QUEUEDIR" || exit 1 - -# check for empty queuedir -if [ "$(echo ./*.mail)" = './*.mail' ]; then - echo "No mails in $QUEUEDIR" - exit 0 -fi - -# lock the $QUEUEDIR -touch "$LOCKFILE" || exit 1 - -# process all mails -for MAILFILE in *.mail; do - MSMTPFILE="$(echo $MAILFILE | sed -e 's/mail/msmtp/')" - echo "*** Sending $MAILFILE to $(sed -e 's/^.*-- \(.*$\)/\1/' $MSMTPFILE) ..." - if [ ! -f "$MSMTPFILE" ]; then - echo "No corresponding file $MSMTPFILE found" - echo "FAILURE" - continue - fi - msmtp $OPTIONS $(cat "$MSMTPFILE") < "$MAILFILE" - if [ $? -eq 0 ]; then - rm "$MAILFILE" "$MSMTPFILE" - echo "$MAILFILE sent successfully" - else - echo "FAILURE" - fi -done - -# remove the lock -rm -f "$LOCKFILE" - -exit 0 |
