etc/setenv/rc
2020-11-04 07:48:02 +05:00

18 lines
365 B
Text

# Setting environment for rc-like shells.
# This part lets me to set variables by files and add functionality.
fn setenv {
rc=$1
mkdir -p $env
# Variables.
for(file in $env/$rc/var/* ){
test -r $file && `{basename $file} = `{cat $file}
}
# Additional scripts to run on startup.
for(file in $env/$rc/rc/*){
test -r $file && . $file
}
dirs=''
rc=''
}