@@ -6,7 +6,7 @@ function install_git() {
66 || apt-get install -t stable -y --no-install-recommends git )
77}
88
9- function install_liblttng_ust () {
9+ function install_liblttng-ust () {
1010 if [[ $( apt-cache search -n liblttng-ust0 | awk ' {print $1}' ) == " liblttng-ust0" ]]; then
1111 apt-get install -y --no-install-recommends liblttng-ust0
1212 fi
@@ -16,7 +16,7 @@ function install_liblttng_ust() {
1616 fi
1717}
1818
19- function install_awscli () {
19+ function install_aws-cli () {
2020 ( curl " https://awscli.amazonaws.com/awscli-exe-linux-$( uname -m) .zip" -o " awscliv2.zip" \
2121 && unzip -q awscliv2.zip -d /tmp/ \
2222 && /tmp/aws/install \
@@ -25,7 +25,7 @@ function install_awscli() {
2525 || pip3 install --no-cache-dir awscli
2626}
2727
28- function install_gitlfs () {
28+ function install_git-lfs () {
2929 local DPKG_ARCH
3030 DPKG_ARCH=" $( dpkg --print-architecture) "
3131
@@ -35,6 +35,10 @@ function install_gitlfs() {
3535 rm -rf /tmp/lfs.tar.gz " /tmp/git-lfs-${GIT_LFS_VERSION} "
3636}
3737
38+ function install_docker-cli() {
39+ apt-get install -y docker-ce-cli --no-install-recommends --allow-unauthenticated
40+ }
41+
3842function install_docker() {
3943 apt-get install -y docker-ce docker-ce-cli docker-buildx-plugin containerd.io docker-compose-plugin --no-install-recommends --allow-unauthenticated
4044
@@ -44,11 +48,11 @@ function install_docker() {
4448 sed -i ' s/ulimit -Hn/# ulimit -Hn/g' /etc/init.d/docker
4549}
4650
47- function install_container_tools () {
51+ function install_container-tools () {
4852 ( apt-get install -y --no-install-recommends podman buildah skopeo || : )
4953}
5054
51- function install_githubcli () {
55+ function install_github-cli () {
5256 local DPKG_ARCH GH_CLI_VERSION GH_CLI_DOWNLOAD_URL
5357
5458 DPKG_ARCH=" $( dpkg --print-architecture) "
@@ -104,13 +108,17 @@ function install_powershell() {
104108}
105109
106110function install_tools() {
107- install_git
108- install_liblttng_ust
109- install_awscli
110- install_gitlfs
111- install_docker
112- install_container_tools
113- install_githubcli
114- install_yq
115- install_powershell
111+ local function_name
112+ # shellcheck source=/dev/null
113+ source " $( dirname " ${BASH_SOURCE[0]} " ) /config.sh"
114+
115+ script_packages | while read -r package; do
116+ function_name=" install_${package} "
117+ if declare -f " ${function_name} " > /dev/null; then
118+ " ${function_name} "
119+ else
120+ echo " No install script found for package: ${package} "
121+ exit 1
122+ fi
123+ done
116124}
0 commit comments