Commit 78c1979b9fde6f04926b720e5125dcd5d6fb9af3

Thomas de Grivel 2023-02-15T02:27:48

wip shpkg_ci

diff --git a/share/shpkg/shpkg.subr b/share/shpkg/shpkg.subr
index 5473e2c..0f5af65 100644
--- a/share/shpkg/shpkg.subr
+++ b/share/shpkg/shpkg.subr
@@ -5,7 +5,7 @@
 
 SHPKG_DATE="$(date +%F_%T)"
 
-SHPKG_DIR="${SHPKG_DIR:-${HOME}/shpkg}"
+: ${SHPKG_DIR:=~/shpkg}
 
 SHPKG_ETC_DIR="${SHPKG_DIR}/etc/shpkg"
 SHPKG_INCLUDE_DIR="${SHPKG_DIR}/include"
@@ -17,13 +17,6 @@ SHPKG_VAR_DB_DIR="${SHPKG_DIR}/var/db/shpkg"
 
 SHPKG_PREFIX="${SHPKG_DIR}"
 
-# CI
-
-: ${SHPKG_CI_DIR:=${SHPKG_DIR}/ci}
-SHPKG_CI_BUILD_DIR="${SHPKG_CI_DIR}/build"
-SHPKG_CI_LOG_DIR="${SHPKG_CI_DIR}/log/${SHPKG_OS_}/${SHPKG_TARGET}"
-SHPKG_CI_STATUS_DIR="${SHPKG_CI_DIR}/status/${SHPKG_OS_}/${SHPKG_TARGET}"
-
 # Console output
 
 SHPKG_COLOR_BLUE="$(printf '\33[0;34m')"
@@ -193,6 +186,11 @@ shpkg_config () {
     else
         err 1 "sha256 executable not found"
     fi
+    # CI
+    : ${SHPKG_CI_DIR:=~/shpkg/ci}
+    SHPKG_CI_BUILD_DIR="${SHPKG_CI_DIR}/build"
+    SHPKG_CI_LOG_DIR="${SHPKG_CI_DIR}/log/${SHPKG_OS_}/${SHPKG_TARGET}"
+    SHPKG_CI_STATUS_DIR="${SHPKG_CI_DIR}/status/${SHPKG_OS_}/${SHPKG_TARGET}"
     # Directories
     if ! [ -d "${SHPKG_FAKE_DIR}" ]; then
         verbose 1 mkdir -p "${SHPKG_FAKE_DIR}"