put everything in a subshell
This commit is contained in:
parent
70d035c410
commit
9cb637facd
1 changed files with 4 additions and 6 deletions
10
blag
10
blag
|
@ -86,18 +86,16 @@ codeblock() {
|
|||
printf '</code></pre>'
|
||||
}
|
||||
|
||||
render() {
|
||||
local birth=$(stat -c'%W' "$1")
|
||||
render() {(
|
||||
birth=$(stat -c'%W' "$1")
|
||||
if (( birth > 0 )); then
|
||||
CREATED_AT=$(date --rfc-3339=seconds -d "@$birth")
|
||||
fi
|
||||
MODIFIED_AT=$(date --rfc-3339=seconds -d "@$(stat -c '%Y' "$1")")
|
||||
|
||||
#shellcheck disable=SC1090
|
||||
( . "$1"; ) # the moment you've all been waiting for
|
||||
}
|
||||
|
||||
|
||||
. "$1"
|
||||
)}
|
||||
|
||||
print_help() {
|
||||
echo "Usage: $0 <SCRIPT>
|
||||
|
|
Loading…
Reference in a new issue