From fe5b74511fb144a51191b1598763c9c240568871 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Wed, 5 Nov 2025 17:00:13 -0800 Subject: [PATCH] Update install.sh --- install.sh | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/install.sh b/install.sh index 4150844..b0cff56 100755 --- a/install.sh +++ b/install.sh @@ -25,13 +25,6 @@ case $(uname) in ;; esac -is_comment() { - case "${1}" in - \#*) return 0 ;; - *) return 1 ;; - esac -} - have_command() { command -v "${1}" >/dev/null 2>&1 } @@ -100,44 +93,12 @@ install_basic_dir() { local file find "${SRCDIR}" ${FINDTYPE} f -print | \ while read -r file ; do - local TARGET="${2}/${file#"${SRCDIR}"/}" + local TARGET="${DESTDIR}/${file#"${SRCDIR}"/}" mkdir -p "$(dirname "${TARGET}")" ln -s -f "${file}" "${TARGET}" done } -install_git() { - # Install or update a git repository - if ! have_command git ; then - return 1 - fi - local REPO="${*: -2:1}" - local DESTDIR="${*: -1:1}" - set -- "${@:1:$(($#-2))}" - if [ -d "${DESTDIR}/.git" ] ; then - ( cd "${DESTDIR}" ; git pull -q ) - else - if [ "${MINIMAL}" -eq 1 ] ; then - git clone --depth 1 "$@" "${REPO}" "${DESTDIR}" - else - git clone "$@" "${REPO}" "${DESTDIR}" - fi - fi -} - -add_bin_symlink() { - local LINKNAME="${HOME}/bin/${2:-$(basename "$1")}" - if [ -e "${LINKNAME}" ] && ! [ -h "${LINKNAME}" ] ; then - echo "Refusing to overwrite ${LINKNAME}" >&2 - return 1 - fi - ln -sf "${1}" "${LINKNAME}" -} - -postinstall() { - true -} - ssh_key_already_installed() { # Return 1 if the key isn't already installed, 0 if it is local AK="${HOME}/.ssh/authorized_keys" @@ -318,7 +279,6 @@ install_main() { } install_dotfiles install_basic_dir "${BASEDIR}/bin" "${HOME}/bin" - test "$MINIMAL" = 1 || postinstall test "$INSTALL_KEYS" = 1 && install_keys save_prefs setup_git_email