Skip to content

Commit 59ca9ae

Browse files
committed
(maint) Remove extraneous shellcheck guards and fix some defaults
* Removes shellcheck disable SC2154 where defaults were provided for PT_* variables, thereby ensuring existence of a value. * Switches to declare PT__installdir to pass shellcheck for that case. * Removes erroneous single quotes from defaults, since they are taken literally in the default.
1 parent 0c2568a commit 59ca9ae

File tree

3 files changed

+14
-25
lines changed

3 files changed

+14
-25
lines changed

files/common.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#! /usr/bin/env bash
22

33
# PT_* variables are set by Bolt.
4-
# shellcheck disable=SC2154
5-
installdir=$PT__installdir
4+
declare PT__installdir
65

76
tempdir=$(mktemp -d)
87
trap 'rm -rf $tempdir' EXIT
@@ -210,7 +209,7 @@ set_os_family() {
210209
# $os_major_version
211210
# $os_family
212211
set_platform_globals() {
213-
local facts="${installdir}/facts/tasks/bash.sh"
212+
local facts="${PT__installdir}/facts/tasks/bash.sh"
214213
if [ -e "${facts}" ]; then
215214
platform=$(bash "${facts}" platform)
216215
os_full_version=$(bash "${facts}" release)

tasks/install_build_artifact_linux.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@
33
set -e
44

55
# PT_* variables are set by Bolt.
6-
# shellcheck disable=SC2154
7-
installdir=$PT__installdir
8-
# shellcheck disable=SC2154
9-
version=${PT_version}
10-
# shellcheck disable=SC2154
11-
package=${PT_package:-'openvox-agent'}
12-
# shellcheck disable=SC2154
13-
artifacts_source=${PT_artifacts_source:-'https://artifacts.voxpupuli.org'}
6+
declare PT__installdir
7+
version=${PT_version:-}
8+
package=${PT_package:-openvox-agent}
9+
artifacts_source=${PT_artifacts_source:-https://artifacts.voxpupuli.org}
1410

1511
# shellcheck source=files/common.sh
16-
source "${installdir}/openvox_bootstrap/files/common.sh"
12+
source "${PT__installdir}/openvox_bootstrap/files/common.sh"
1713

1814
# Lookup the cpu architecture and set it as cpu_arch.
1915
# Translates x86_64 to amd64 and aarch64 to arm64 for debian/ubuntu.

tasks/install_linux.sh

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,15 @@
33
set -e
44

55
# PT_* variables are set by Bolt.
6-
# shellcheck disable=SC2154
7-
installdir=$PT__installdir
8-
# shellcheck disable=SC2154
9-
package=${PT_package:-'openvox-agent'}
10-
# shellcheck disable=SC2154
11-
version=${PT_version:-'latest'}
12-
# shellcheck disable=SC2154
13-
collection=${PT_collection:-'openvox8'}
14-
# shellcheck disable=SC2154
15-
yum_source=${PT_yum_source:-'https://yum.voxpupuli.org'}
16-
# shellcheck disable=SC2154
17-
apt_source=${PT_apt_source:-'https://apt.voxpupuli.org'}
6+
declare PT__installdir
7+
package=${PT_package:-openvox-agent}
8+
version=${PT_version:-latest}
9+
collection=${PT_collection:-openvox8}
10+
yum_source=${PT_yum_source:-https://yum.voxpupuli.org}
11+
apt_source=${PT_apt_source:-https://apt.voxpupuli.org}
1812

1913
# shellcheck source=files/common.sh
20-
source "${installdir}/openvox_bootstrap/files/common.sh"
14+
source "${PT__installdir}/openvox_bootstrap/files/common.sh"
2115

2216
# Based on platform family set:
2317
# repository - the package repository to download from

0 commit comments

Comments
 (0)