diff --git a/pack.d/mimo-code.sh b/pack.d/mimo-code.sh new file mode 100644 index 00000000..29c6c88f --- /dev/null +++ b/pack.d/mimo-code.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +TAR="$1" +RETURNTARNAME="$2" +VERSION="$3" +URL="$4" + +. $(dirname $0)/common.sh + +[ -n "$VERSION" ] || VERSION="$(echo "$URL" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.]+)?' | head -n1)" +[ -n "$VERSION" ] || fatal "Can't get package version" + +mkdir -p usr/bin +erc --here unpack "$TAR" || fatal +mv mimo usr/bin/mimo || fatal +chmod 755 usr/bin/mimo + +PKGNAME=$PRODUCT-$VERSION + +erc pack $PKGNAME.tar usr/bin || fatal + +cat <$PKGNAME.tar.eepm.yaml +name: $PRODUCT +group: Development/Tools +license: MIT +url: https://github.com/XiaomiMiMo/MiMo-Code +summary: MiMo-Code +description: Next-generation AI coding assistant for developers with unlimited context +EOF + +return_tar $PKGNAME.tar diff --git a/play.d/mimo-code.sh b/play.d/mimo-code.sh new file mode 100644 index 00000000..018199b2 --- /dev/null +++ b/play.d/mimo-code.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +PKGNAME=mimo-code +SUPPORTEDARCHES="x86_64 aarch64" +VERSION="$2" +DESCRIPTION="Next-generation AI coding assistant for developers with unlimited context" +URL="https://github.com/XiaomiMiMo/MiMo-Code" + +. $(dirname $0)/common.sh + +arch="$(epm print info -a)" +case "$arch" in + x86_64) + arch=x64 + ;; + aarch64) + arch=arm64 + ;; + *) + fatal "$arch arch is not supported" + ;; +esac + +PKGURL=$(get_github_url "$URL" "mimocode-linux-$arch.tar.gz") + +install_pack_pkgurl