etc/dot/file/profile

67 lines
1.5 KiB
Text
Raw Normal View History

2020-11-04 02:03:20 +03:00
#!/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' \
2020-11-04 05:48:02 +03:00
DEV '$HOME/dev' \
LIB '$HOME/lib' \
IMG '$HOME/img' \
SND '$HOME/snd' \
DOC '$HOME/doc' \
VID '$HOME/vid' \
LOAD '$HOME/load' \
TXT '$HOME/txt' \
2020-11-04 05:48:02 +03:00
SHR '$HOME/shr' \
MNT '$HOME/mnt' \
2020-12-15 21:34:19 +03:00
PUB '$HOME/pub' \
2020-11-04 05:48:02 +03:00
TMP '$HOME/tmp' \
EXE '$HOME/exe' \
2020-11-04 02:03:20 +03:00
SHPROMPT '"% "' \
PS1 '"$SHPROMPT"' \
SUDO_PROMPT '"#"' \
EDITOR 'ed' \
VISUAL 'vi' \
GIT_EDITOR '$VISUAL' \
PAGER 'less' \
MANPAGER '$PAGER' \
2020-11-04 05:48:02 +03:00
MAN '$SHR/man' \
2020-11-04 02:03:20 +03:00
PROFILE '$HOME/.profile' \
TMPL '$HOME/tmpl' \
APP '$HOME/app' \
ENVDIR '$HOME/env' \
SETENV '$LIB/setenv/sh' \
2020-11-04 02:03:20 +03:00
GOPATH '$APP/go' \
GOEXE '$GOPATH/bin'\
COMPOSEREXE '$LIB/composer/vendor/bin' \
2021-06-15 05:48:00 +03:00
VPATH '$APP/v'\
2020-11-04 02:03:20 +03:00
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' \
ANDROID_NDK_HOME '$APP/android/ndk' \
2020-11-04 02:03:20 +03:00
LOGIN '$LIB/login/sh' \
2021-02-17 02:36:56 +03:00
GIT 'https://github.com/$USER' \
2021-06-29 12:20:32 +03:00
PATH '$EXE:$PATH:$GOEXE:$PLAN9BASE/bin:$PLAN9PORT/bin:$VEXE:$COMPOSEREXE' \
2020-11-04 02:03:20 +03:00
test -r $SETENV && . "$SETENV" && setenv profile
2020-11-04 02:03:20 +03:00