5e45c1f23a
refacted load.sh and startup.sh accordingly and also used loop to process the shell repos switched from export to declare for module.lib allows multiple network domains to be set in shell.env. This allows primary and vpn setups moved docker and language files out of base added comment functions
14 lines
368 B
Bash
14 lines
368 B
Bash
#!/bin/bash
|
|
function comment_line() {
|
|
local regex="${1:?}"
|
|
local file="${2:?}"
|
|
local comment_mark="${3:-#}"
|
|
sed -ri "s:^([ ]*)($regex):\\1$comment_mark\\2:" "$file"
|
|
}
|
|
|
|
function uncomment_line() {
|
|
local regex="${1:?}"
|
|
local file="${2:?}"
|
|
local comment_mark="${3:-#}"
|
|
sed -ri "s:^([ ]*)[$comment_mark]+[ ]?([ ]*$regex):\\1\\2:" "$file"
|
|
}
|