etc/dot/file/profile

52 lines
1.1 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
}
2021-11-30 03:48:21 +03:00
q(){
exit
}
2020-11-04 02:03:20 +03:00
# Standard variables.
export_loop \
ENV '$HOME/.shrc' \
2021-12-04 21:57:51 +03:00
PS1 '"% "' \
2020-11-04 02:03:20 +03:00
SUDO_PROMPT '"#"' \
2021-12-04 21:57:51 +03:00
EDITOR 'vi' \
2020-11-04 02:03:20 +03:00
VISUAL 'vi' \
GIT_EDITOR '$VISUAL' \
PAGER 'less' \
MANPAGER '$PAGER' \
2021-12-04 21:57:51 +03:00
\
2020-11-04 02:03:20 +03:00
PROFILE '$HOME/.profile' \
ENVDIR '$HOME/env' \
2021-12-04 21:57:51 +03:00
SETENV '$HOME/lib/setenv/sh' \
LOGIN '$HOME/lib/login/sh' \
INDENT '" "'\
\
GOPATH '$HOME/app/go' \
GOBIN '$HOME/exe'\
COMPOSEREXE '$HOME/lib/composer/vendor/bin' \
XDG_CONFIG_HOME '$HOME/lib' \
XDG_RUNTIME_DIR '$HOME/tmp' \
XDG_DATA_HOME '$HOME/app' \
XCOMPOSEFILE '$HOME/lib/xcompose' \
ANDROID_NDK_HOME '$HOME/app/android/ndk' \
2021-02-17 02:36:56 +03:00
GIT 'https://github.com/$USER' \
2021-12-04 21:57:51 +03:00
PATH '$HOME/exe:$PATH' \
2020-11-04 02:03:20 +03:00
test -r $SETENV && . "$SETENV" && setenv profile
2020-11-04 02:03:20 +03:00