]> git.madduck.net Git - etc/mutt.git/blobdiff - .mutt/mkconf

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

move mutt config to ~/.config
[etc/mutt.git] / .mutt / mkconf
diff --git a/.mutt/mkconf b/.mutt/mkconf
deleted file mode 100755 (executable)
index e98a9e1..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-set -eu
-
-FILE="${1:-${0%/*}/confvars}"
-TARGET="${2:-}"
-
-if [ ! -f "$FILE" ]; then
-  echo >&2 "E: File $FILE does not exist"
-  exit 1
-fi
-
-if [ -z "$TARGET" ]; then
-  TARGET="$FILE"
-fi
-
-TMPFILE="$(mktemp -t vit.XXXXXXXX)"
-cleanup() { rm -f "$TMPFILE"; trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15; }
-trap cleanup 1 2 3 4 5 6 7 8 10 11 12 13 14 15
-
-process_stanza() {
-  echo "$2"
-  local opt setting trailer
-  opt="$(sed -ne "/^set ${1}=/,/# 3\./p" $FILE)"
-  if [ -n "$opt" ]; then
-    opt="${opt%
-*}"
-    setting="${opt%%
-*}"
-    echo >&2 "Importing setting: $setting …"
-    echo "$setting"
-    echo "$opt" | grep '^#' || :
-  fi
-  echo
-  echo
-}
-
-option=
-{ zcat /usr/share/doc/mutt/manual.txt.gz | \
-  sed -e '1,/^3\. Configuration Variables$/d;1d;/^4\./,$d' -e 's, , ,g';
-  echo END; } | \
-
-while read first rest; do
-  line="$first ${rest%% }"
-  case "$first" in
-    (3.[0-9]*|END)
-      [ -z "$option" ] || \
-        process_stanza "$option" "${stanza}"
-      stanza="# $line"
-      option="$rest"
-      ;;
-    ('')
-      stanza="${stanza:+$stanza\n}#$line"
-      ;;
-    (*)
-      stanza="${stanza:+$stanza\n}# $line"
-      ;;
-  esac
-
-done > $TMPFILE
-
-cat <<_eof > "$TARGET"
-# Auto-generated using mkconf from manual.txt
-# on $(date +'%Y-%m-%d %H:%M:%S')
-#
-# Invoked as: $0${1:+ $@}
-#
-
-$(cat "$TMPFILE")
-
-# vim:sw=12:noet:sts=12:ts=12:ft=muttrc
-_eof
-cleanup