Commit 8b0ea37c3ddfc469fc5e8fd93f43d8ca24ec35af

Thomas de Grivel 2023-02-14T21:48:20

wip shpkg_ci

diff --git a/bin/shpkg_ci b/bin/shpkg_ci
index b2f4e1a..ed7476e 100755
--- a/bin/shpkg_ci
+++ b/bin/shpkg_ci
@@ -4,9 +4,11 @@ set -e
 
 # shpkg
 
-. ~/shpkg/etc/shpkg/profile
+: ${SHPKG_DIR:=~/shpkg}
 
-. ~/shpkg/share/shpkg/shpkg.subr
+. "${SHPKG_DIR}/etc/shpkg/profile"
+
+. "${SHPKG_DIR}/share/shpkg/shpkg.subr"
 
 verbose 2 shpkg_config
 
@@ -151,5 +153,3 @@ main () {
 }
 
 shpkg_log shpkg_ci main "$@"
-
-exit ${SHPKG_CI_STATUS}
diff --git a/share/shpkg/shpkg.subr b/share/shpkg/shpkg.subr
index 2299498..86c3c26 100644
--- a/share/shpkg/shpkg.subr
+++ b/share/shpkg/shpkg.subr
@@ -165,7 +165,7 @@ shpkg_config () {
     if [ "x${SHPKG_OS}" = "xLinux" ]; then
         SHPKG_DISTRIB="$(uname -a | grep -io -e Debian -e gentoo -e Ubuntu | sed -e 's|gentoo|Gentoo|')"
         SHPKG_OS="${SHPKG_OS}/${SHPKG_DISTRIB}"
-        SHPKG_OS_="${SHPKG_OS}_${SHPKG_DISTRIB}"
+        SHPKG_OS_="${SHPKG_OS_}_${SHPKG_DISTRIB}"
     fi
     SHPKG_OS_DIR="${SHPKG_SHARE_DIR}/${SHPKG_OS}"
     # Number of CPU cores