From 6dce415077e807be36761b42109a6c8551ffa42f Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sun, 30 Sep 2018 14:00:58 +0800 Subject: [PATCH] Simplify self_update --- ghcup | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ghcup b/ghcup index e9294f4..4fb2d75 100755 --- a/ghcup +++ b/ghcup @@ -128,7 +128,6 @@ FLAGS: ARGS: [TARGET-LOCATION] Where to place the updated script (defaults to ~/.local/bin). - Must be an absolute path! ") exit 1 } @@ -474,7 +473,6 @@ set_ghc() { ## self-update subcommand ## -# TODO: relative path # @FUNCTION: self_update # @USAGE: # @DESCRIPTION: @@ -488,10 +486,9 @@ self_update() { status_message "Updating ${SCRIPT}" ( - edo cd "$(mktemp -d)" + edo cd "${target_location}" edo download "${SCRIPT_UPDATE_URL}" - edo mv ghcup "${target_location}"/ghcup edo chmod +x "${target_location}"/ghcup ) || die "failed to install"