From b9b6665f0b08312beb4a65798bc41c050fbac33a Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Wed, 30 Aug 2023 05:41:14 +0000 Subject: [PATCH] fix setup --- setup | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup b/setup index 375f162..b07778f 100755 --- a/setup +++ b/setup @@ -21,12 +21,12 @@ section() { copy() { printf "%s => %s\n" "$(blue "$(printf '%-25s' "$1")")" "$2" - cp "$origin/$1" "$2" + cp "$1" "$2" } sudo_copy() { printf "%s => %s\n" "$(blue "$(printf '%-25s' "$1")")" "$2" - $sudo cp "$origin/$1" "$2" + $sudo cp "$1" "$2" } copy_executable() { @@ -100,7 +100,7 @@ initialize() { repo="$1" repo_url="https://github.com/${repo}.git" - origin=$(mktemp -d) + pushd $(mktemp -d) > /dev/null } section "Initializing" @@ -110,7 +110,7 @@ section "Checking for pre-requisites" need git section "Cloning $repo" -git clone --depth 1 "$repo_url" "$origin" +git clone --depth 1 "$repo_url" . section "Copying files" copy_executable 'rush'