Skip to content

Commit a4e5820

Browse files
committed
Move OUTPUT definition to oks-lib.sh & use it in start-session.
We `export` the `OUTPUT` variable to keep shellcheck happy: SC2034.
1 parent 91ef172 commit a4e5820

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

script/oks-lib.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# functions common to oks scripts
33

44
CD_DEV=/dev/cdrom
5+
export OUTPUT=/var/lib/oks
56

67
error() {
78
>&2 command echo ["$(date --utc +%FT%TZ)" ERROR "${0##*/}"] "$@"

script/start-session

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -eou pipefail
55
. oks-lib.sh
66

77
info "Creating output directory."
8-
mkdir -p output
8+
mkdir -p "$OUTPUT"
99

1010
info "Starting terminal session recording."
11-
script --t=output/script-timing.log -a output/script.log
11+
script --t="$OUTPUT"/script-timing.log -a "$OUTPUT"/script.log

script/write-output

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ set -euo pipefail
1212
command_on_path mkisofs
1313
command_on_path cdrecord
1414

15-
OUTPUT="/var/lib/oks"
16-
1715
TMP_DIR=$(mktemp --directory)
1816
trap 'rm -rf -- "$TMP_DIR"' EXIT
1917

0 commit comments

Comments
 (0)