etc/setenv/rc

19 lines
366 B
Text
Raw Normal View History

2020-11-04 02:03:20 +03:00
# 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=''
}