From 56749ef791fa4a4bc1fade6889a2a754640609e8 Mon Sep 17 00:00:00 2001 From: Ranomier Date: Wed, 28 Apr 2021 13:22:47 +0200 Subject: [PATCH] add gitignore and the apps folder --- .gitignore | 1 + update.sh | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fa14ae1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/apps/ diff --git a/update.sh b/update.sh index c29db78..e140d7a 100755 --- a/update.sh +++ b/update.sh @@ -2,6 +2,8 @@ #set -eu -o pipefail +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +APPS_DIR="$SCRIPT_DIR""/apps" URLS="$(\ curl -s https://api.github.com/repos/neovim/neovim/releases/latest | grep -o 'https://.*linux64\.tar\.gz')\n" @@ -12,6 +14,7 @@ printf ">> Found the following files:\n" printf "$URLS" printf "\n" +cd "$APPS_DIR" printf ">> Downloading files:\n" printf "$URLS" | xargs curl -LJO --progress-bar printf "\n" @@ -22,3 +25,4 @@ printf "done\n\n" printf ">> Removing files:\n" printf "$FILENAMES" | xargs rm -v +cd - > /dev/null