1 if [ -f $HOME/path_add-function
]; then
2 .
$HOME/path_add-function
3 path_add
/usr
/sbin
/usr
/local
/sbin
/sbin
4 path_add
/a
/exe
/a
/opt
/bin
$HOME/.cabal
/bin
6 if [ -r /etc
/alternatives
/java_sdk
]; then
7 export JAVA_HOME
=/etc
/alternatives
/java_sdk
8 path_add
/etc
/alternatives
/java_sdk
12 export EDITOR
="emacsclient"
13 # this makes emacsclient file/-c start a server instance if none is running,
14 # instead of some alternate editor logic
15 export ALTERNATE_EDITOR
=""
18 # makes subsequent syscalls to localtime use cached timezone,
19 # so basically restart the comp if you change time zones,
20 # and avoid a few syscalls, which makes a tiny tiny perf difference.
22 # /a/c/filesystem/etc/systemd/system.conf.d/tz.conf
23 # https://blog.packagecloud.io/eng/2017/02/21/set-environment-variable-save-thousands-of-system-calls/
24 export TZ
=:/etc
/localtime
26 # ubuntu starts gpg agent automatically with /etc/X11/Xsession.d/90gpg-agent.
27 # fedora doesn't, which left me to figure this out, and google was no help.
28 # fedora documentation is often quite bad :(
29 # This is mostly copied from that file.
30 # Main difference is that we eval the result of starting gpg-agent,
31 # while that file executes it through xsession specific var.
32 # Also make sourcing the pidfile make more sense.
33 # End result should be the same afaik.
34 # for gpg-agent to work when calling gpg from the command line,
35 # we need an environment variable that is setup via the eval.
36 # which is why we do this upon login, so it can propogate
37 # It is also written to the file $HOME/.gnupg/gpg-agent-info-$(hostname)
38 # I'm not aware if that is ever used, but just fyi.
39 # I also added the bit about xmessaging the stderr,
40 # because I'd like to know if the command fails
41 if [ -f /etc
/fedora-release
]; then
42 : ${GNUPGHOME=$HOME/.gnupg}
44 GPGAGENT
=/usr
/bin
/gpg-agent
45 PID_FILE
="$GNUPGHOME/gpg-agent-info-$(hostname)"
47 if ! $GPGAGENT 2>/dev
/null
; then
49 eval "$($GPGAGENT --homedir /p/do-not-delete --daemon --sh --write-env-file=$PID_FILE 2>$temp)"
51 [ -n "$temperr" ] && xmessage
"gpg-agent stderr: $temperr"
52 elif [ -r "$PID_FILE" ]; then
58 # ubuntu has 002 for non-system users, debian has 022. 002 makes groups
59 # be rw instead of r. One security concern is where some unixes put
60 # every user in a same group, so if you copy files there with exact
61 # perms, that is probably not what you want. I don't use a system like
62 # that. I don't care much either way, but the ubuntu one seems a bit
64 if (( EUID
>= 1000 )); then