Something went wrong. Try again.
Mirroring: https://github.com/MunifTanjim/scripts.sh
Something went wrong. Try again.
scripts.sh setup-fzf
770 B · 33 lines
at main
12345678910111213141516171819202122232425262728293031323334#!/usr/bin/env bash
set -e
function get_latest_reposiotry() { local repo_uri="${1}" local repo_dir="${2}"
echo "Repository URI: ${repo_uri}" if [[ ! -d "${repo_dir}" ]]; then echo "Cloning repository..." mkdir -p "$(dirname "${repo_dir}")" git clone --quiet --recursive --depth 10 "${repo_uri}" "${repo_dir}" pushd "${repo_dir}" >/dev/null else echo "Pulling latest commits..." pushd "${repo_dir}" >/dev/null git pull git submodule update --init fi
popd >/dev/null}
function setup_fzf() { get_latest_reposiotry "https://github.com/junegunn/fzf" "${HOME}/.local/share/fzf" pushd "${HOME}/.local/share/fzf" >/dev/null
echo "Installing..." ./install --xdg --completion --key-bindings --no-update-rc}
setup_fzf