etc/setenv/rc
2020-11-04 04:03:20 +05:00

18 lines
366 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 $dirs
# 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=''
}