Skip to content

Commit

Permalink
fix: correct lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Aug 25, 2024
1 parent a04d8ec commit 91ec86c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
20 changes: 10 additions & 10 deletions bin/apt-install
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
# Usage: apt-install package1 package2 package3 ...

main() {
declare PACKAGES=("$@")
declare PACKAGES=("$@")

if [[ ${#PACKAGES[@]} -eq 0 ]]; then
echo "Usage: apt-install package1 package2 package3 ..."
exit 1
fi
if [[ ${#PACKAGES[@]} -eq 0 ]]; then
echo "Usage: apt-install package1 package2 package3 ..."
exit 1
fi

DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get -o Dpkg::Use-Pty=0 --no-install-recommends -y install "${PACKAGES[@]}"
apt-get clean
rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /var/tmp/*
DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get -o Dpkg::Use-Pty=0 --no-install-recommends -y install "${PACKAGES[@]}"
apt-get clean
rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /var/tmp/*
}

main "$@"
42 changes: 21 additions & 21 deletions include/buildpack.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ _envfile-parse() {
key=${key#*export }
value="${line#*=}"
case "$value" in
\'* | \"*)
# shellcheck disable=SC2269
value="${value}"
;;
*)
value=\""${value}"\"
;;
\'* | \"*)
# shellcheck disable=SC2269
value="${value}"
;;
*)
value=\""${value}"\"
;;
esac
echo "export ${key}=${value}"
done <<<"$(cat)"
Expand Down Expand Up @@ -113,20 +113,20 @@ buildpack-install() {
else
local tar_args
case "$url" in
*.tgz | *.tar.gz)
target_path="${target_path//.tgz/}"
target_path="${target_path//.tar.gz/}"
tar_args="-xzC"
;;
*.tbz | *.tar.bz)
target_path="${target_path//.tbz/}"
target_path="${target_path//.tar.bz/}"
tar_args="-xjC"
;;
*.tar)
target_path="${target_path//.tar/}"
tar_args="-xC"
;;
*.tgz | *.tar.gz)
target_path="${target_path//.tgz/}"
target_path="${target_path//.tar.gz/}"
tar_args="-xzC"
;;
*.tbz | *.tar.bz)
target_path="${target_path//.tbz/}"
target_path="${target_path//.tar.bz/}"
tar_args="-xjC"
;;
*.tar)
target_path="${target_path//.tar/}"
tar_args="-xC"
;;
esac
echo "Downloading '$url' into '$target_path'..."
mkdir -p "$target_path"
Expand Down

0 comments on commit 91ec86c

Please sign in to comment.