Skip to content

Commit

Permalink
feat: use bashdep on install-dependencies.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed Oct 28, 2024
1 parent 2358ecd commit d6ef974
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion create-pr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ declare -r CREATE_PR_VERSION="0.7.0"
CREATE_PR_ROOT_DIR="$(dirname "${BASH_SOURCE[0]}")"
export CREATE_PR_ROOT_DIR

source "$CREATE_PR_ROOT_DIR/src/debug.sh"
source "$CREATE_PR_ROOT_DIR/src/dev/dumper.sh"
source "$CREATE_PR_ROOT_DIR/src/helpers.sh"
source "$CREATE_PR_ROOT_DIR/src/validate.sh"
source "$CREATE_PR_ROOT_DIR/src/pr_ticket.sh"
Expand Down
17 changes: 15 additions & 2 deletions install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
#!/bin/bash

## bashunit
curl -s https://bashunit.typeddevs.com/install.sh | bash -s lib beta
# Ensure bashdep is installed
[ ! -f lib/bashdep ] && {
mkdir -p lib
curl -sLo lib/bashdep https://github.com/Chemaclass/bashdep/releases/download/0.1/bashdep
chmod +x lib/bashdep
}

DEPENDENCIES=(
"https://github.com/TypedDevs/bashunit/releases/download/0.18.0/bashunit"
"https://github.com/Chemaclass/bash-dumper/releases/download/0.1/dumper.sh@dev"
)

source lib/bashdep
bashdep::setup dir="lib" dev-dir="src/dev" silent=false
bashdep::install "${DEPENDENCIES[@]}"
2 changes: 0 additions & 2 deletions src/debug.sh → src/dev/dumper.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

# source: https://github.com/Chemaclass/bash-dumper

# Pass in any number of ANSI SGR codes.
#
# Code reference:
Expand Down

0 comments on commit d6ef974

Please sign in to comment.