Skip to content

Commit

Permalink
[boostrap] Update bootstrapping for scripts to load from repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Nov 7, 2024
1 parent 1570d19 commit 61dc1ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 5 additions & 6 deletions script/install-git-commands
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ command -v git-thaw || install-git-freeze-bin git-thaw
command -v git-abandon || install-git-freeze-bin git-abandon

function install-scripts-bin {
src_bin=${1}
dest_bin=${2}
echo "Installing: ${dest_bin}"
curl -o "/tmp/${dest_bin}" "https://raw.githubusercontent.com/lgarron/dotfiles/scripts/main/${src_bin}"
sudo cp "/tmp/${dest_bin}" "/usr/bin/${dest_bin}"
dest_bin=${1}
src_bin=${2}
echo "Installing: ${script}"
sudo cp "scripts/${src_bin}" "/usr/bin/${dest_bin}"
sudo chmod +x "/usr/bin/${dest_bin}"
}

command -v git-distance || install-scripts-bin git/git-distance.fish git-distance
command -v git-distance || install-scripts-bin git-distance git/git-distance.fish
11 changes: 5 additions & 6 deletions script/install-lgarron-scripts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

set -euo pipefail

function install-lgarron-script {
script="${1}"
script_source="${2}"
function install-scripts-bin {
dest_bin=${1}
src_bin=${2}
echo "Installing: ${script}"
curl -o "/tmp/${script}" "https://raw.githubusercontent.com/lgarron/dotfiles/scripts/main/${script_source}"
sudo cp "/tmp/${script}" "/usr/bin/${script}"
sudo chmod +x "/usr/bin/${script}"
sudo cp "scripts/${src_bin}" "/usr/bin/${dest_bin}"
sudo chmod +x "/usr/bin/${dest_bin}"
}

function install-lgarron-script-with-completions {
Expand Down

0 comments on commit 61dc1ea

Please sign in to comment.