etc/setenv/rc

19 lines
365 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
2020-11-04 05:48:02 +03:00
mkdir -p $env
2020-11-04 02:03:20 +03:00
# 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=''
}