~mdw
/
profile
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Various hacks to support use of Ed25519 keys in OpenSSH.
[profile]
/
dot
/
bash_profile
diff --git
a/dot/bash_profile
b/dot/bash_profile
index
4ce6280
..
47c408b
100644
(file)
--- a/
dot/bash_profile
+++ b/
dot/bash_profile
@@
-93,6
+93,12
@@
__mdw_addto PYTHONPATH r $HOME/lib/python
###--------------------------------------------------------------------------
### Various other kinds of configuration.
###--------------------------------------------------------------------------
### Various other kinds of configuration.
+__mdw_setconf () {
+ if val=$(mdw-conf 2>/dev/null "$2"); then
+ eval "export $1=\$val"
+ fi
+}
+
## Establish a temporary directory.
[ "$TMPDIR" ] || eval `tmpdir -b`
export TMP=$TMPDIR
## Establish a temporary directory.
[ "$TMPDIR" ] || eval `tmpdir -b`
export TMP=$TMPDIR
@@
-101,9
+107,9
@@
export TMP=$TMPDIR
umask 002
## Mail and general identification.
umask 002
## Mail and general identification.
-export MAIL=`mdw-conf mailbox`
+__mdw_setconf MAIL mailbox
export NAME="Mark Wooding"
export NAME="Mark Wooding"
-export EMAIL=`mdw-conf email`
+__mdw_setconf EMAIL email
export QMAILINJECT=c
## Some programs want to know the hostname.
export QMAILINJECT=c
## Some programs want to know the hostname.
@@
-131,9
+137,9
@@
export EDITOR=mdw-editor VISUAL=mdw-editor
## Determine the locale settings. Really don't set LC_COLLATE because it
## messes with the order of files in `ls' listings and similar.
if [ "$DISPLAY" != "" ]; then
## Determine the locale settings. Really don't set LC_COLLATE because it
## messes with the order of files in `ls' listings and similar.
if [ "$DISPLAY" != "" ]; then
- LANG=`mdw-conf x-ctype`
+ LANG=`mdw-conf x-ctype
POSIX
`
else
else
- : ${LANG=${LC_CTYPE-${LC_ALL-`mdw-conf console-ctype`}}}
+ : ${LANG=${LC_CTYPE-${LC_ALL-`mdw-conf console-ctype
POSIX
`}}}
case "$TERM,`tty`" in
linux,/dev/tty*)
if { vt-is-UTF8 ||
case "$TERM,`tty`" in
linux,/dev/tty*)
if { vt-is-UTF8 ||
@@
-199,7
+205,7
@@
unset browsers
## Acquiring root privileges. This is mainly the job of `bashrc', but we
## cache the mechanism here.
## Acquiring root privileges. This is mainly the job of `bashrc', but we
## cache the mechanism here.
-export __MDW_ROOTLY=`mdw-conf rootly`
+__mdw_setconf __MDW_ROOTLY rootly
export BECOME="--preserve-environment"
## It's useful to see the little sigils in `ls'.
export BECOME="--preserve-environment"
## It's useful to see the little sigils in `ls'.
@@
-210,12
+216,12
@@
export BASCAT="-l +n"
## Version control hacking.
export CVS_RSH=ssh
## Version control hacking.
export CVS_RSH=ssh
-export CVSROOT=`mdw-conf cvs-root`
-export SVNROOT=`mdw-conf svn-root`
+__mdw_setconf CVSROOT cvs-root
+__mdw_setconf SVNROOT svn-root
export P4CONFIG=.p4
## News server.
export P4CONFIG=.p4
## News server.
-[ -z "$NNTPSERVER" ] && export NNTPSERVER=`mdw-conf nntp-server`
+__mdw_setconf NNTPSERVER nntp-server
## Help X programs find their resources.
export XUSERFILESEARCHPATH="$HOME/.Xapps/%N:/usr/lib/X11/%T/%N%S"
## Help X programs find their resources.
export XUSERFILESEARCHPATH="$HOME/.Xapps/%N:/usr/lib/X11/%T/%N%S"
@@
-239,13
+245,11
@@
ulimit -S -c 0
if { { [ "$GNOME_KEYRING_CONTROL" ] &&
[ -s "$GNOME_KEYRING_CONTROL" ]; } ||
{ [ "$DBUS_SESSION_BUS_ADDRESS" ] &&
if { { [ "$GNOME_KEYRING_CONTROL" ] &&
[ -s "$GNOME_KEYRING_CONTROL" ]; } ||
{ [ "$DBUS_SESSION_BUS_ADDRESS" ] &&
- dbus-send --session --print-reply --dest=org.freedesktop.DBus \
- / org.freedesktop.DBus.GetNameOwner string:org.gnome.keyring \
- >/dev/null 2>/dev/null; }; } &&
- stuff=$(gnome-keyring-daemon -s -c ssh 2>/dev/null)
+ __mdw_programp gnome-keyring-daemon; }; } &&
+ stuff=$(gnome-keyring-daemon -s -c gpg 2>/dev/null)
then
eval "$stuff"
then
eval "$stuff"
- export SSH_AUTH_SOCK
+ export SSH_AUTH_SOCK
GPG_AGENT_INFO
fi
## If we still don't have an agent then start one with a stable name.
fi
## If we still don't have an agent then start one with a stable name.