Skip to content

Commit 2ef0c49

Browse files
committed
Use lowercase for local vars
Variables can be any case but using uppercase generally means they came out of the environment. Even `BUILD_DIR` here should be lowercase as it's a local var (possibly set from an env var).
1 parent 387d04a commit 2ef0c49

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

bin/build-dist

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ minil-build() (
2323
# TODO: It looks like minil doesn't accept a build directory name, so we
2424
# just find the last created dir and use that.
2525
# shellcheck disable=SC2012
26-
DIR=$(
26+
dir=$(
2727
ls -td -- */ |
2828
head -n 1 |
2929
cut -d'/' -f1
3030
)
31-
mv "$DIR" "$BUILD_DIR"
31+
mv "$dir" "$BUILD_DIR"
3232
)
3333

3434
build-pl() (
@@ -41,8 +41,8 @@ build-pl() (
4141

4242
# Module::Build does not support a build directory, so we have to find
4343
# the last created dir and use that.
44-
DIR=$(perl -MModule::Build -e 'print Module::Build->resume->dist_dir;')
45-
mv "$DIR" "$BUILD_DIR"
44+
dir=$(perl -MModule::Build -e 'print Module::Build->resume->dist_dir;')
45+
mv "$dir" "$BUILD_DIR"
4646
)
4747

4848
std-perl-build() (
@@ -55,12 +55,12 @@ std-perl-build() (
5555

5656
# same as with minil
5757
# shellcheck disable=SC2012
58-
DIR=$(
58+
dir=$(
5959
ls -td -- */ |
6060
head -n 1 |
6161
cut -d'/' -f1
6262
)
63-
mv "$DIR" "$BUILD_DIR"
63+
mv "$dir" "$BUILD_DIR"
6464
)
6565

6666
main "$@"

0 commit comments

Comments
 (0)