From e3356f16f001088fd3efb93ae18b57867998f3c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Val=C3=AD=C4=8Dek=20=28YCNet=29?= Date: Tue, 6 Feb 2018 12:00:38 +0100 Subject: [PATCH] Config - default vs configured paths --- src/config | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/config b/src/config index 841ae90..df3ea8c 100644 --- a/src/config +++ b/src/config @@ -1,7 +1,12 @@ #!/bin/bash -cfgMirrorPath=/home/vasek/asdf -cfgCachePath=/home/vasek/asdf-cache +# Default values +defaultMirrorPath=$HOME/.git-mirror +defaultCachePath=$HOME/.git-mirror-cache + +# Config ones - replaced with environment vars +cfgMirrorPath=${CCLONE_PATH:-$defaultMirrorPath} +cfgCachePath=${CCLONE_CACHE:-$defaultCachePath} # modify PATH bindir=$(dirname $(realpath $0))