From 2351a498ef1a6fd7f1ff267ba3a568ce57e539ae Mon Sep 17 00:00:00 2001 From: ulises-jeremias Date: Sun, 11 Jun 2023 02:22:35 -0300 Subject: [PATCH] Updated bin install --- common/bin/install | 15 --------------- common/install | 9 +++++++-- 2 files changed, 7 insertions(+), 17 deletions(-) delete mode 100755 common/bin/install diff --git a/common/bin/install b/common/bin/install deleted file mode 100755 index cda83c31..00000000 --- a/common/bin/install +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -ROOT="$(realpath "$(dirname "$0")")" -SCRIPT_NAME=$(basename "$0") - -for bin_path in "${ROOT}"/*; do - bin=$(basename "${bin_path}") - if [[ "${bin}" = "${SCRIPT_NAME}" ]]; then - continue - fi - - chmod +x "${bin_path}" - rm -f ~/.local/bin/"${bin}" >/dev/null 2>&1 - ln -sf "$(realpath "${bin_path}")" ~/.local/bin/"${bin}" -done diff --git a/common/install b/common/install index 5962d279..976147f1 100644 --- a/common/install +++ b/common/install @@ -44,8 +44,13 @@ fi describe "Creating symlinks for bin files" -chmod +x "${DOTFILES_DIR}"/bin/install -"${DOTFILES_DIR}"/bin/install +for bin_path in "${DOTFILES_DIR}"/bin/*; do + bin=$(basename "${bin_path}") + + chmod +x "${bin_path}" + rm -f ~/.local/bin/"${bin}" >/dev/null 2>&1 + ln -sf "$(realpath "${bin_path}")" ~/.local/bin/"${bin}" +done echo -e "${GREEN}Done${RESET}"