增加 bun arm版
parent
452a4b571e
commit
c4a2ed198b
|
@ -4,8 +4,18 @@ app_name="bun"
|
|||
tmp_dir="/tmp/${app_name}_tmp"
|
||||
version="1.0.0"
|
||||
release="v${version}"
|
||||
pkg_arch="x64"
|
||||
deb_arch="amd64"
|
||||
|
||||
deb_url="https://github.com/oven-sh/bun/releases/download/bun-${release}/bun-linux-x64.zip"
|
||||
if [ "$1" == "arm" ]; then
|
||||
pkg_arch="aarch64"
|
||||
deb_arch="arm64"
|
||||
fi
|
||||
echo $1
|
||||
echo $pkg_arch, $deb_arch
|
||||
# exit 0
|
||||
|
||||
deb_url="https://github.com/oven-sh/bun/releases/download/bun-${release}/bun-linux-${pkg_arch}.zip"
|
||||
|
||||
# 创建临时目录, 用于下载官方包
|
||||
if [ -d $tmp_dir ]; then
|
||||
|
@ -28,14 +38,14 @@ mkdir -p "./unpack/DEBIAN"
|
|||
mkdir -p "./unpack/usr/bin"
|
||||
|
||||
echo "下载官方原包..."
|
||||
wget $deb_url -O "${tmp_dir}/bun-linux-x64.zip"
|
||||
wget $deb_url -O "${tmp_dir}/bun-linux-${pkg_arch}.zip"
|
||||
|
||||
|
||||
echo "下载完成, 解包中..."
|
||||
unzip "${tmp_dir}/bun-linux-x64.zip" -d $tmp_dir
|
||||
unzip "${tmp_dir}/bun-linux-${pkg_arch}.zip" -d $tmp_dir
|
||||
|
||||
echo "解包完成, 复制到待打包目录..."
|
||||
mv ${tmp_dir}/bun-linux-x64/* "./unpack/usr/bin/"
|
||||
mv ${tmp_dir}/bun-linux-${pkg_arch}/* "./unpack/usr/bin/"
|
||||
|
||||
rm -rf $tmp_dir
|
||||
|
||||
|
@ -52,12 +62,12 @@ Package: ${app_name}
|
|||
Version: ${version}
|
||||
Section: devlop
|
||||
Installed-Size: ${size[0]}
|
||||
Architecture: amd64
|
||||
Architecture: ${deb_arch}
|
||||
Maintainer: Yutent <yutent.io@gmail.com>
|
||||
Priority: optional
|
||||
Homepage: https://bun.sh/
|
||||
Description: Incredibly fast JavaScript runtime.
|
||||
Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one.
|
||||
Incredibly fast JavaScript runtime, bundler, transpiler and package manager - all in one.
|
||||
|
||||
""" > DEBIAN/control
|
||||
|
||||
|
|
Loading…
Reference in New Issue