Commit c6da71c9 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play: add claude-code

parent 9bf796e8
#!/bin/sh
TAR="$1"
RETURNTARNAME="$2"
VERSION="$3"
. $(dirname $0)/common.sh
PRODUCTDIR=opt/claude.ai
install -D -m755 $TAR $PRODUCTDIR/claude || fatal
[ -n "$VERSION" ] || fatal "can't pack with empty VERSION"
PKGNAME=$PRODUCT-$VERSION
erc pack $PKGNAME.tar $PRODUCTDIR
cat <<EOF >$PKGNAME.tar.eepm.yaml
name: $PRODUCT
version: $VERSION
group: Networking/Instant messaging
license: Proprietary
url: https://claude.ai/
summary: Claude is a next generation AI assistant
description: Claude is a next generation AI assistant built by Anthropic
EOF
return_tar $PKGNAME.tar
#!/bin/sh
PKGNAME=claude-code
SUPPORTEDARCHES="x86_64 aarch64"
VERSION="$2"
DESCRIPTION="Claude is a next generation AI assistant built by Anthropic"
URL="https://claude.ai/"
. $(dirname $0)/common.sh
arch="$(epm print info -a)"
case "$arch" in
x86_64)
arch=x64
;;
aarch64)
arch=arm64
;;
esac
# TODO: Darwin support
os="linux"
platform="${os}-${arch}"
#GCS_BUCKET="https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases"
GCS_BUCKET="$(fetch_url -O- https://claude.ai/install.sh | grep "^GCS_BUCKET=" | sed -e 's|^GCS_BUCKET=||' -e 's|^"||' -e 's|"$||')"
[ -n "$GCS_BUCKET" ] || fatal "Can't download https://claude.ai/install.sh"
if [ "$VERSION" = "*" ] ; then
VERSION="$(fetch_url -O- "$GCS_BUCKET/stable")" || fatal "Can't get version from $GCS_BUCKET/stable"
[ -n "$VERSION" ] || fatal "Got empty version from $GCS_BUCKET/stable"
fi
# ["platforms","linux-x64","checksum"]
checksum="$(get_json_value "$GCS_BUCKET/$VERSION/manifest.json" '["platforms","'$platform'","checksum"]')" || fatal "Can't get checksum"
PKGURL="$GCS_BUCKET/$VERSION/$platform/claude"
# TODO: compare checksum
install_pack_pkgurl $VERSION $checksum
#!/bin/sh -x
# It will be run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
PRODUCT=claude
PRODUCTDIR=/opt/claude.ai
. $(dirname $0)/common.sh
add_bin_link_command
add_libs_requires
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