From 8c0eba70e46251da5c852ed05bd53c00e5287570 Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Thu, 12 Aug 2021 19:29:29 -0300 Subject: [PATCH] Cd into the script's dir before starting --- install.sh | 3 +++ post-install.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/install.sh b/install.sh index 3d4f170..a011b23 100755 --- a/install.sh +++ b/install.sh @@ -30,6 +30,9 @@ ultra_quiet() { ### FORCE ROOT ### [ $(whoami) != "root" ] && echo "Please run as root" && exit 1 +### CD TO MY DIR ### +cd "$(basename "$0")" + ### URLs ### FZF_DOWNLOAD="$(curl -s https://api.github.com/repos/junegunn/fzf/releases/latest | grep linux_amd64 | sed -nE 's/^\s*"browser_download_url":\s*"(.*)"\s*$/\1/p')" PARTED_DOWNLOAD="https://archlinux.org/packages/extra/x86_64/parted/download" diff --git a/post-install.sh b/post-install.sh index f33823f..d395cdb 100755 --- a/post-install.sh +++ b/post-install.sh @@ -21,6 +21,9 @@ quiet() { set -e } +### CD TO MY DIR ### +cd "$(basename "$0")" + ### URLs ### DOTFILES="https://github.com/augustogunsch/dotfiles" PACKAGES_URL="https://raw.githubusercontent.com/augustogunsch/install-arch/master/packages.csv"