51 lines
1.1 KiB
Bash
Executable file
51 lines
1.1 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
|
|
}
|
|
|
|
q(){
|
|
exit
|
|
}
|
|
|
|
# Standard variables.
|
|
export_loop \
|
|
ENV '$HOME/.shrc' \
|
|
PS1 '"% "' \
|
|
SUDO_PROMPT '"#"' \
|
|
EDITOR 'vi' \
|
|
VISUAL 'vi' \
|
|
GIT_EDITOR '$VISUAL' \
|
|
PAGER 'less' \
|
|
MANPAGER '$PAGER' \
|
|
\
|
|
PROFILE '$HOME/.profile' \
|
|
ENVDIR '$HOME/env' \
|
|
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' \
|
|
GIT 'https://github.com/$USER' \
|
|
PATH '$HOME/exe:$PATH' \
|
|
|
|
test -r $SETENV && . "$SETENV" && setenv profile
|
|
|