chore: mostly cleanup and formatting
This commit is contained in:
parent
bd4bc1b7ee
commit
ab3e8132cc
|
@ -1 +1 @@
|
||||||
[[ -n "$BASH_COMPLETION_EXIST" && -n $(type -fP chezmoi) ]] && source <(chezmoi completion bash | add-alias-to-bash-completion-code cz )
|
[[ -n "$BASH_COMPLETION_EXIST" && -n $(which-command chezmoi) ]] && source <(chezmoi completion bash | add-alias-to-bash-completion-code chezmoi cz )
|
||||||
|
|
|
@ -1 +1,4 @@
|
||||||
[[ -r /usr/share/bash-completion/bash_completion ]] && BASH_COMPLETION_EXIST=1
|
if [[ -r /usr/share/bash-completion/bash_completion ]]; then
|
||||||
|
BASH_COMPLETION_EXIST=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
alias which-command="type -fP "
|
alias which-command="type -fP "
|
||||||
|
|
||||||
function add-alias-to-bash-completion-code() {
|
function add-alias-to-bash-completion-code() {
|
||||||
local CMD=$(printf "%s" "sed '" 's/\(complete\W.*-F\W.*chezmoi\)/\1 ' "$1/g'")
|
local CMD=$(printf "%s" "sed '" 's/\(complete\W.*-F\W.*' "$1" '.*$\)/\1 ' "$2/g'")
|
||||||
|
[[ -r "$3" ]] && CMD="$CMD -i $3"
|
||||||
|
[[ -n "$4" ]] && CMD="$4 $CMD"
|
||||||
eval "$CMD"
|
eval "$CMD"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
# Make sure the /usr/share/keyrings dir exists
|
# Make sure the /usr/share/keyrings dir exists
|
||||||
sudo mkdir -p /usr/share/keyrings 2>&1 > /dev/null
|
sudo mkdir -p /usr/share/keyrings 2>&1 > /dev/null
|
||||||
|
|
||||||
|
@ -28,7 +27,7 @@ function add_repo() {
|
||||||
REPO_URL=${4:-https:\/\/$REPO_FQDN}
|
REPO_URL=${4:-https:\/\/$REPO_FQDN}
|
||||||
REPO_SUITE=${5:-$_CNM}
|
REPO_SUITE=${5:-$_CNM}
|
||||||
REPO_CMP=${6:-main}
|
REPO_CMP=${6:-main}
|
||||||
|
|
||||||
curl -fsSL $GPG_KEY_URL | sudo gpg --dearmor -o $GPG_KEY_PATH $_YES
|
curl -fsSL $GPG_KEY_URL | sudo gpg --dearmor -o $GPG_KEY_PATH $_YES
|
||||||
echo "Key created: $GPG_KEY_PATH"
|
echo "Key created: $GPG_KEY_PATH"
|
||||||
echo "deb [$(echo "$REPO_ARCH signed-by=$GPG_KEY_PATH" | xargs )] $REPO_URL $REPO_SUITE $REPO_CMP" | \
|
echo "deb [$(echo "$REPO_ARCH signed-by=$GPG_KEY_PATH" | xargs )] $REPO_URL $REPO_SUITE $REPO_CMP" | \
|
||||||
|
@ -42,7 +41,7 @@ function add_repo() {
|
||||||
# ---------------------------- ------------------------------------------------------- ---------- ------------------------------------------------ ----------- ---------
|
# ---------------------------- ------------------------------------------------------- ---------- ------------------------------------------------ ----------- ---------
|
||||||
# for: docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
# for: docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
||||||
# Also don't forget:
|
# Also don't forget:
|
||||||
# remove: docker docker-engine docker.io containerd runc
|
# remove: docker docker-engine docker.io containerd runc
|
||||||
# possibly remove docker-compose and install: https://github.com/docker/compose-switch
|
# possibly remove docker-compose and install: https://github.com/docker/compose-switch
|
||||||
add_repo 'download.docker.com' "https://download.docker.com/linux/$_OS/gpg" '' "https://download.docker.com/linux/$_OS" '' 'stable'
|
add_repo 'download.docker.com' "https://download.docker.com/linux/$_OS/gpg" '' "https://download.docker.com/linux/$_OS" '' 'stable'
|
||||||
# for: anydesk
|
# for: anydesk
|
||||||
|
|
Loading…
Reference in New Issue