From 4285be126cb0d67cb7701334cd2e333dfc3ee8af Mon Sep 17 00:00:00 2001 From: rezso Date: Fri, 1 Jun 2018 03:03:23 +0200 Subject: [PATCH] =?UTF-8?q?GET=5FCACHEDIR=20l=C3=A9trehoz=C3=A1sa,=20ha=20?= =?UTF-8?q?nem=20l=C3=A9tezik?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/get | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/get b/src/get index 7f7ae84..4fda369 100755 --- a/src/get +++ b/src/get @@ -368,6 +368,10 @@ function _get() { c=$((a&~m)) chmod 0$(printf %03o $c) -- "$filename" + if [ ! -d "$GET_CACHEDIR" ]; then + mkdir -p "$GET_CACHEDIR" + fi + if [ -n "$cachedir" -a -w "$GET_CACHEDIR" ]; then mkdir -p "$cachedir" && cp -af "$name" "$cachedir"/ fi