🤞 Sync 2026-09-06 22:50:31

This commit is contained in:
github-actions[bot] committed 2026-09-06 22:50:31 +08:00
1 parent bb7d626e94
commit 64c17e592d
115 files changed
+8599 -1391

No files matched your search

+5 -3
View File
@@ -15,7 +15,7 @@ MISE_HASH_aarch64:=06186cfbfe947049b21d58575fb0ea800cc26ed1375f20f4b678cb3a9d679
PKG_NAME:=mise
PKG_VERSION:=2026.9.1
PKG_RELEASE:=6
PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION)-linux-$(MISE_ARCH)-musl.tar.gz
PKG_SOURCE_URL:=https://github.com/jdx/mise/releases/download/v$(PKG_VERSION)/
PKG_HASH:=skip
@@ -57,11 +57,13 @@ define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/config $(1)/etc/uci-defaults $(1)/lib/functions
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/sbin $(1)/etc/config $(1)/etc/uci-defaults $(1)/lib/functions
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/mise $(1)/usr/bin/mise
$(INSTALL_BIN) ./files/mise-exec $(1)/usr/sbin/mise-exec
$(INSTALL_BIN) ./files/mise-istore $(1)/usr/sbin/mise-istore
$(INSTALL_CONF) ./files/mise.config $(1)/etc/config/mise
$(INSTALL_BIN) ./files/mise.uci-default $(1)/etc/uci-defaults/mise
$(INSTALL_BIN) ./files/istore_runtime.sh $(1)/lib/functions/istore_runtime.sh
$(INSTALL_DATA) ./files/mise.sh $(1)/lib/functions/mise.sh
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
-121
View File
@@ -1,121 +0,0 @@
#!/bin/sh
. /lib/functions.sh
ISTORE_RUNTIME_DEFAULT_SUBDIR="Runtime"
ISTORE_RUNTIME_HOME_SUBDIR="home"
istore_runtime_uci_section() {
if uci -q get mise.main >/dev/null 2>&1; then
printf 'main\n'
return 0
fi
printf ''
return 1
}
istore_runtime_quickstart_conf_dir() {
local main_dir conf_dir
config_load quickstart >/dev/null 2>&1 || return 1
config_get main_dir main main_dir ""
[ -n "$main_dir" ] || return 1
config_get conf_dir main conf_dir "$main_dir/Configs"
[ -n "$conf_dir" ] || return 1
printf '%s\n' "$conf_dir"
}
istore_runtime_linkease_conf_dir() {
local local_home
local_home="$(uci -q get linkease.@linkease[0].local_home 2>/dev/null || true)"
[ -n "$local_home" ] || return 1
printf '%s/Configs\n' "$local_home"
}
istore_runtime_env_conf_dir() {
[ -n "$ISTORE_RUNTIME_CONF_DIR" ] || return 1
printf '%s\n' "$ISTORE_RUNTIME_CONF_DIR"
}
istore_runtime_discover_dir() {
local conf_dir
conf_dir="$(istore_runtime_env_conf_dir 2>/dev/null || true)"
if [ -z "$conf_dir" ]; then
conf_dir="$(istore_runtime_quickstart_conf_dir 2>/dev/null || true)"
fi
if [ -z "$conf_dir" ]; then
conf_dir="$(istore_runtime_linkease_conf_dir 2>/dev/null || true)"
fi
[ -n "$conf_dir" ] || return 1
printf '%s/%s\n' "$conf_dir" "$ISTORE_RUNTIME_DEFAULT_SUBDIR"
}
istore_runtime_dir() {
local section runtime_dir auto_discover
section="$(istore_runtime_uci_section 2>/dev/null || true)"
if [ -n "$section" ]; then
config_load mise >/dev/null 2>&1 || true
config_get runtime_dir "$section" runtime_dir ""
config_get_bool auto_discover "$section" auto_discover 1
if [ -n "$runtime_dir" ]; then
printf '%s\n' "$runtime_dir"
return 0
fi
[ "$auto_discover" = "1" ] || return 1
fi
istore_runtime_discover_dir
}
istore_runtime_home() {
local runtime_dir
runtime_dir="$(istore_runtime_dir)" || return 1
printf '%s/%s\n' "$runtime_dir" "$ISTORE_RUNTIME_HOME_SUBDIR"
}
istore_runtime_init() {
local runtime_dir runtime_home section
runtime_dir="$(istore_runtime_dir)" || return 1
runtime_home="$runtime_dir/$ISTORE_RUNTIME_HOME_SUBDIR"
mkdir -p \
"$runtime_home/.local/share/mise" \
"$runtime_home/.cache/mise" \
"$runtime_home/.config/mise" \
"$runtime_home/.local/state/mise" \
"$runtime_home/.local/bin" || return 1
section="$(istore_runtime_uci_section 2>/dev/null || true)"
if [ -n "$section" ]; then
uci -q set "mise.$section.runtime_dir=$runtime_dir" >/dev/null 2>&1 || true
uci -q commit mise >/dev/null 2>&1 || true
fi
printf '%s\n' "$runtime_home"
}
istore_runtime_export_env() {
local runtime_home
runtime_home="$(istore_runtime_init)" || return 1
export HOME="$runtime_home"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_STATE_HOME="$HOME/.local/state"
export MISE_DATA_DIR="$XDG_DATA_HOME/mise"
export MISE_CACHE_DIR="$XDG_CACHE_HOME/mise"
export MISE_CONFIG_DIR="$XDG_CONFIG_HOME/mise"
export MISE_STATE_DIR="$XDG_STATE_HOME/mise"
export PATH="$MISE_DATA_DIR/shims:$HOME/.local/bin:$PATH"
}
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
. /lib/functions/mise.sh
istore_runtime_env || exit 1
exec /bin/ash
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
. /lib/functions/mise.sh
istore_runtime_env || exit 1
exec /usr/bin/mise "$@"
-2
View File
@@ -1,4 +1,2 @@
config mise 'main'
option enabled '1'
option runtime_dir ''
option auto_discover '1'
+52
View File
@@ -0,0 +1,52 @@
#!/bin/sh
. /lib/functions.sh
istore_runtime_quickstart_conf_dir() {
local main_dir conf_dir
config_load quickstart >/dev/null 2>&1 || return 1
config_get conf_dir main conf_dir ""
if [ -z "$conf_dir" ]; then
config_get main_dir main main_dir ""
[ -n "$main_dir" ] || return 1
conf_dir="$main_dir/Configs"
fi
printf '%s\n' "$conf_dir"
}
istore_runtime_set_runtime_dir() {
local conf_dir runtime_dir
config_load mise >/dev/null 2>&1 || return 1
config_get runtime_dir main runtime_dir ""
[ -z "$runtime_dir" ] || return 0
conf_dir="$(istore_runtime_quickstart_conf_dir)" || return 1
runtime_dir="$conf_dir/Runtime/home"
uci -q set "mise.main.runtime_dir=$runtime_dir" >/dev/null 2>&1 || return 1
uci -q commit mise >/dev/null 2>&1
}
istore_runtime_init() {
local runtime_dir
config_load mise >/dev/null 2>&1 || return 1
config_get runtime_dir main runtime_dir ""
[ -n "$runtime_dir" ] || istore_runtime_set_runtime_dir
}
istore_runtime_env() {
local runtime_dir
config_load mise >/dev/null 2>&1 || return 1
config_get runtime_dir main runtime_dir ""
[ -n "$runtime_dir" ] || runtime_dir="${HOME:-}"
[ -n "$runtime_dir" ] || return 1
mkdir -p "$runtime_dir" || return 1
export HOME="$runtime_dir"
export PATH="$HOME/.local/share/mise/shims${PATH:+:$PATH}"
}
+3 -5
View File
@@ -1,8 +1,6 @@
#!/bin/sh
if [ -r /lib/functions/istore_runtime.sh ]; then
. /lib/functions/istore_runtime.sh
istore_runtime_init >/dev/null 2>&1 || true
fi
[ -r /lib/functions/mise.sh ] || exit 1
. /lib/functions/mise.sh
exit 0
istore_runtime_init