mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-12 16:52:37 +00:00
feat!: refactor base, config, dfm and scripts
This commit is contained in:
@@ -2,13 +2,17 @@
|
||||
# Install GitHub CLI extensions
|
||||
#
|
||||
# shellcheck source="shared.sh"
|
||||
eval "$HOME/.dotfiles/scripts/shared.sh"
|
||||
source "${DOTFILES}/config/shared.sh"
|
||||
|
||||
# Enable verbosity with VERBOSE=1
|
||||
VERBOSE="${VERBOSE:-0}"
|
||||
|
||||
msg_run "Installing gh (GitHub Client) extensions"
|
||||
|
||||
! x-have "gh" \
|
||||
&& msg_err "gh (GitHub Client) could not be found, please install it first" \
|
||||
&& exit 0
|
||||
if ! command -v gh &> /dev/null; then
|
||||
msg_err "gh (GitHub Client) could not be found, please install it first"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
extensions=(
|
||||
# GitHub CLI extension for generating a report on repository dependencies.
|
||||
@@ -30,15 +34,25 @@ extensions=(
|
||||
rsese/gh-actions-status
|
||||
)
|
||||
|
||||
for ext in "${extensions[@]}"; do
|
||||
# Trim spaces
|
||||
ext=${ext// /}
|
||||
# Skip comments
|
||||
if [[ ${ext:0:1} == "#" ]]; then continue; fi
|
||||
# Function to install GitHub CLI extensions
|
||||
install_extensions()
|
||||
{
|
||||
for ext in "${extensions[@]}"; do
|
||||
# Trim spaces
|
||||
ext=${ext// /}
|
||||
# Skip comments
|
||||
if [[ ${ext:0:1} == "#" ]]; then continue; fi
|
||||
|
||||
msg_nested "Installing $ext"
|
||||
gh extensions install "$ext"
|
||||
echo ""
|
||||
done
|
||||
msg_nested "Installing $ext"
|
||||
gh extension install "$ext"
|
||||
echo ""
|
||||
done
|
||||
}
|
||||
|
||||
msg_ok "Done"
|
||||
main()
|
||||
{
|
||||
install_extensions
|
||||
msg_ok "Done"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
Reference in New Issue
Block a user