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' \
|
2020-11-04 02:24:45 +03:00
|
|
|
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' \
|
2020-11-04 02:24:45 +03:00
|
|
|
APP '$HOME/app' \
|
|
|
|
ENVDIR '$HOME/env' \
|
|
|
|
SETENV '$LIB/setenv/sh' \
|
2020-11-04 02:03:20 +03:00
|
|
|
GOPATH '$APP/go' \
|
|
|
|
GOEXE '$GOPATH/bin'\
|
2021-06-30 11:04:27 +03:00
|
|
|
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' \
|
2021-06-15 18:31:04 +03:00
|
|
|
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
|
|
|
|
2020-11-04 02:24:45 +03:00
|
|
|
test -r $SETENV && . "$SETENV" && setenv profile
|
2020-11-04 02:03:20 +03:00
|
|
|
|