From 6c3ab38bb6c48bf8b889c6c24ae144a977dfa1a5 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Thu, 5 Dec 2019 11:04:22 +0100 Subject: [PATCH] fix: dev: factorize some literals in a variable !minor Signed-off-by: Valentin Lab --- bin/compose | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/compose b/bin/compose index 9ae0d1f..faefec3 100755 --- a/bin/compose +++ b/bin/compose @@ -748,14 +748,16 @@ set_os() { {~,"$WIN_HOME"}/.compose.conf ) + APPDATA_BASE="$WIN_HOME/AppData/Local/Compose" + COMPOSE_LAUNCHER_APP_DIR="$WIN_PROGRAM_FILES/Compose" - COMPOSE_LOCAL_ROOT=${COMPOSE_LOCAL_ROOT:-"$WIN_HOME/AppData/Local/Compose/Launcher"} + COMPOSE_LOCAL_ROOT=${COMPOSE_LOCAL_ROOT:-"$APPDATA_BASE/Launcher"} - COMPOSE_VAR=${COMPOSE_VAR:-"$WIN_HOME/AppData/Local/Compose/lib"} - COMPOSE_CACHE=${COMPOSE_CACHE:-"$WIN_HOME/AppData/Local/Compose/cache"} + COMPOSE_VAR=${COMPOSE_VAR:-"$APPDATA_BASE/lib"} + COMPOSE_CACHE=${COMPOSE_CACHE:-"$APPDATA_BASE/cache"} - DATASTORE=${DATASTORE:-"$WIN_HOME/AppData/Local/Compose/data"} - CONFIGSTORE=${CONFIGSTORE:-"$WIN_HOME/AppData/Local/Compose/config"} + DATASTORE=${DATASTORE:-"$APPDATA_BASE/data"} + CONFIGSTORE=${CONFIGSTORE:-"$APPDATA_BASE/config"} mkdir -p "$COMPOSE_VAR" "$COMPOSE_CACHE" "$DATASTORE" "$CONFIGSTORE" || return 1 SESSION_DIR=${SESSION_DIR:-"$COMPOSE_LOCAL_ROOT"/sessions}