Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions pack.d/mimo-code.sh
Original file line number Diff line number Diff line change
@@ -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 <<EOF >$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
26 changes: 26 additions & 0 deletions play.d/mimo-code.sh
Original file line number Diff line number Diff line change
@@ -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