63 lines
1.4 KiB
Bash
Executable file
63 lines
1.4 KiB
Bash
Executable file
#!/bin/sh
|
|
# k1574's profile.
|
|
|
|
export_loop(){
|
|
# Chore, because I'm lazy to type "export" so many times.
|
|
# Standard "export" command takes arguments
|
|
# from variables from the start, but I want to
|
|
# use other variables in definition for next of them.
|
|
while [ ! -z "$1" ] ; do
|
|
# Doing until we have arguments.
|
|
value="$(eval echo $2)"
|
|
name="$1"
|
|
export "$name"="$value"
|
|
shift 2
|
|
done
|
|
}
|
|
|
|
# Standard variables.
|
|
export_loop \
|
|
ENV '$HOME/.shrc' \
|
|
DEV '$HOME/dev' \
|
|
LIB '$HOME/lib' \
|
|
IMG '$HOME/img' \
|
|
SND '$HOME/snd' \
|
|
DOC '$HOME/doc' \
|
|
VID '$HOME/vid' \
|
|
LOAD '$HOME/load' \
|
|
TXT '$HOME/txt' \
|
|
SHR '$HOME/shr' \
|
|
MNT '$HOME/mnt' \
|
|
PUB '$HOME/pub' \
|
|
TMP '$HOME/tmp' \
|
|
EXE '$HOME/exe' \
|
|
SHPROMPT '"% "' \
|
|
PS1 '"$SHPROMPT"' \
|
|
SUDO_PROMPT '"#"' \
|
|
EDITOR 'ed' \
|
|
VISUAL 'vi' \
|
|
GIT_EDITOR '$VISUAL' \
|
|
PAGER 'less' \
|
|
MANPAGER '$PAGER' \
|
|
MAN '$SHR/man' \
|
|
PROFILE '$HOME/.profile' \
|
|
TMPL '$HOME/tmpl' \
|
|
APP '$HOME/app' \
|
|
ENVDIR '$HOME/env' \
|
|
SETENV '$LIB/setenv/sh' \
|
|
GOPATH '$APP/go' \
|
|
GOEXE '$GOPATH/bin'\
|
|
VPATH '$DEV/v'\
|
|
VEXE '$VPATH'\
|
|
PLAN9BASE '/usr/local/plan9' \
|
|
PLAN9PORT '$APP/plan9' \
|
|
PLAN9 '$PLAN9PORT' \
|
|
INFERNO '$APP/inferno' \
|
|
XDG_CONFIG_HOME '$LIB' \
|
|
XDG_RUNTIME_DIR '$TMP' \
|
|
XDG_DATA_HOME '$APP' \
|
|
LOGIN '$LIB/login/sh' \
|
|
PATH '$EXE:$PATH:$GOEXE:$PLAN9BASE/bin:$PLAN9PORT/bin:$VEXE' \
|
|
|
|
test -r $SETENV && . "$SETENV" && setenv profile
|
|
|