Commit ef0bee4b authored by Boris Yumankulov's avatar Boris Yumankulov Committed by Vitaly Lipatov

epm play: added pi (eterbug #19040)

parent 091d645a
#!/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
mkdir -p opt/pi-linux
erc --here unpack "$TAR" || fatal
mv pi/* opt/pi-linux
chmod 755 "/opt/pi-linux/pi"
ln -s "/opt/pi-linux/pi" "usr/bin/pi"
PKGNAME=$PRODUCT-$VERSION
erc pack $PKGNAME.tar usr opt || fatal
cat <<EOF >$PKGNAME.tar.eepm.yaml
name: $PRODUCT
group: Development/Tools
license: MIT
url: https://github.com/badlogic/pi-mono
summary: pi coding agent
description: Pi is a minimal terminal coding harness. Adapt pi to your workflows, not the other way around, without having to fork and modify pi internals.
EOF
return_tar $PKGNAME.tar
#!/bin/sh
PKGNAME=pi
SUPPORTEDARCHES="x86_64 aarch64"
VERSION="$2"
DESCRIPTION="A terminal-based coding agent with multi-model support, mid-session model switching, and a simple CLI for headless coding tasks"
URL="https://github.com/badlogic/pi-mono"
. $(dirname $0)/common.sh
arch="$(epm print info -a)"
case "$arch" in
x86_64)
ARCH="x64"
;;
aarch64)
ARCH="arm64"
;;
esac
if [ "$VERSION" = "*" ]; then
PKGURL=$(get_github_url "https://github.com/badlogic/pi-mono" "pi-linux-$ARCH.tar.gz")
else
PKGURL="https://github.com/badlogic/pi-mono/releases/download/v$VERSION/pi-linux-$ARCH.tar.gz"
fi
install_pack_pkgurl
#!/bin/sh -x
# It will run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
. $(dirname $0)/common.sh
add_requires '/usr/bin/node'
add_requires '/usr/bin/fd'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment