From 459428a979a04f66dfe1c7a964918d5fbf44eb8c Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 11 Oct 2022 22:09:42 +0100 Subject: [PATCH] refactor: combine bin directories --- bin/dotfiles | 38 ------------------- bin/{bin => }/drupalorg | Bin bin/{bin => }/git-abort | 0 bin/{bin => }/git-close-pull-request | 0 bin/{bin => }/git-cm | 0 bin/{bin => }/git-continue | 0 bin/{bin => }/git-create-new-tracking-branch | 0 bin/{bin => }/git-delete-merged-branches | 0 bin/{bin => }/git-master-to-main-wrapper | 0 bin/{bin => }/git-opr | 0 bin/{bin => }/git-publish | 0 bin/{bin => }/git-up | 0 bin/{bin => }/git.sh | 0 bin/{bin => }/main-or-master-branch | 0 bin/{bin => }/phpunit-or-pest | 0 bin/{bin => }/tmux-sessioniser | 0 16 files changed, 38 deletions(-) delete mode 100755 bin/dotfiles rename bin/{bin => }/drupalorg (100%) rename bin/{bin => }/git-abort (100%) rename bin/{bin => }/git-close-pull-request (100%) rename bin/{bin => }/git-cm (100%) rename bin/{bin => }/git-continue (100%) rename bin/{bin => }/git-create-new-tracking-branch (100%) rename bin/{bin => }/git-delete-merged-branches (100%) rename bin/{bin => }/git-master-to-main-wrapper (100%) rename bin/{bin => }/git-opr (100%) rename bin/{bin => }/git-publish (100%) rename bin/{bin => }/git-up (100%) rename bin/{bin => }/git.sh (100%) rename bin/{bin => }/main-or-master-branch (100%) rename bin/{bin => }/phpunit-or-pest (100%) rename bin/{bin => }/tmux-sessioniser (100%) diff --git a/bin/dotfiles b/bin/dotfiles deleted file mode 100755 index 7983c79..0000000 --- a/bin/dotfiles +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -set -e - -CONFIG_DIR="$HOME/.config/dotfiles" -DOTFILES_DIR="${DOTFILES_DIR:-$HOME/.dotfiles}" -PATH="${PATH}:${HOME}/.local/bin" - -clone_or_update_dotfiles() { - if ! [[ -d "$DOTFILES_DIR" ]]; then - git clone "https://github.com/opdavies/dotfiles.git" "$DOTFILES_DIR" - else - git -C "$DOTFILES_DIR" pull - fi -} - -create_config_dir() { - mkdir -p "${CONFIG_DIR}" -} - -install_dependencies() { - ansible-galaxy install -r "${DOTFILES_DIR}/requirements.yml" -} - -install_ansible() { - sudo apt-get -yqq update - sudo apt-get -yqq install python3-pip - pip install ansible --user -} - -run_playbook() { - ansible-playbook --diff --extra-vars "@${CONFIG_DIR}/values.yaml" --vault-password-file=${CONFIG_DIR}/vault-password.txt "${DOTFILES_DIR}/main.yaml" "${@}" -} - -clone_or_update_dotfiles -install_ansible -install_dependencies -run_playbook "${@}" diff --git a/bin/bin/drupalorg b/bin/drupalorg similarity index 100% rename from bin/bin/drupalorg rename to bin/drupalorg diff --git a/bin/bin/git-abort b/bin/git-abort similarity index 100% rename from bin/bin/git-abort rename to bin/git-abort diff --git a/bin/bin/git-close-pull-request b/bin/git-close-pull-request similarity index 100% rename from bin/bin/git-close-pull-request rename to bin/git-close-pull-request diff --git a/bin/bin/git-cm b/bin/git-cm similarity index 100% rename from bin/bin/git-cm rename to bin/git-cm diff --git a/bin/bin/git-continue b/bin/git-continue similarity index 100% rename from bin/bin/git-continue rename to bin/git-continue diff --git a/bin/bin/git-create-new-tracking-branch b/bin/git-create-new-tracking-branch similarity index 100% rename from bin/bin/git-create-new-tracking-branch rename to bin/git-create-new-tracking-branch diff --git a/bin/bin/git-delete-merged-branches b/bin/git-delete-merged-branches similarity index 100% rename from bin/bin/git-delete-merged-branches rename to bin/git-delete-merged-branches diff --git a/bin/bin/git-master-to-main-wrapper b/bin/git-master-to-main-wrapper similarity index 100% rename from bin/bin/git-master-to-main-wrapper rename to bin/git-master-to-main-wrapper diff --git a/bin/bin/git-opr b/bin/git-opr similarity index 100% rename from bin/bin/git-opr rename to bin/git-opr diff --git a/bin/bin/git-publish b/bin/git-publish similarity index 100% rename from bin/bin/git-publish rename to bin/git-publish diff --git a/bin/bin/git-up b/bin/git-up similarity index 100% rename from bin/bin/git-up rename to bin/git-up diff --git a/bin/bin/git.sh b/bin/git.sh similarity index 100% rename from bin/bin/git.sh rename to bin/git.sh diff --git a/bin/bin/main-or-master-branch b/bin/main-or-master-branch similarity index 100% rename from bin/bin/main-or-master-branch rename to bin/main-or-master-branch diff --git a/bin/bin/phpunit-or-pest b/bin/phpunit-or-pest similarity index 100% rename from bin/bin/phpunit-or-pest rename to bin/phpunit-or-pest diff --git a/bin/bin/tmux-sessioniser b/bin/tmux-sessioniser similarity index 100% rename from bin/bin/tmux-sessioniser rename to bin/tmux-sessioniser