diff --git a/README.md b/README.md index 2139612..0869bfd 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,6 @@ - `nvim` NeoVim - `bun` Incredibly fast JavaScript runtime + +- `zellij` A terminal workspace with batteries included + diff --git a/bun/package.sh b/bun/package.sh index 0b4019a..75150c6 100755 --- a/bun/package.sh +++ b/bun/package.sh @@ -1,9 +1,9 @@ #!/bin/bash -tmp_dir="/tmp/bun_tmp" app_name="bun" +tmp_dir="/tmp/${app_name}_tmp" version="0.7.1" -release="v0.7.1" +release="v${version}" deb_url="https://github.com/oven-sh/bun/releases/download/bun-${release}/bun-linux-x64.zip" @@ -48,7 +48,7 @@ find usr/ -type f | xargs md5sum > DEBIAN/md5sums IFS=$'\t' read -ra size <<< "$(du -d 0)" echo """ -Package: bun +Package: ${app_name} Version: ${version} Section: devlop Installed-Size: ${size[0]} diff --git a/dingtalk/package.sh b/dingtalk/package.sh index 24ea759..814d15f 100755 --- a/dingtalk/package.sh +++ b/dingtalk/package.sh @@ -1,7 +1,7 @@ #!/bin/bash -tmp_dir="/tmp/dingtalk_tmp" app_name="dingtalk" +tmp_dir="/tmp/${app_name}_tmp" version="7.0.40.30706" release="7.0.40-Release.30706" @@ -107,7 +107,7 @@ find usr/ -type f | xargs md5sum > DEBIAN/md5sums IFS=$'\t' read -ra size <<< "$(du -d 0)" echo """ -Package: dingtalk +Package: ${app_name} Version: ${version} Architecture: amd64 Maintainer: Yutent diff --git a/linuxqq/package.sh b/linuxqq/package.sh index 3c19ac3..71a7f27 100755 --- a/linuxqq/package.sh +++ b/linuxqq/package.sh @@ -1,7 +1,7 @@ #!/bin/bash -tmp_dir="/tmp/linuxqq_tmp" app_name="linuxqq" +tmp_dir="/tmp/${app_name}_tmp" version="3.1.2.12912" release="3.1.2-12912" _hash="80d33f88" @@ -125,7 +125,7 @@ find usr/ -type f | xargs md5sum >> DEBIAN/md5sums IFS=$'\t' read -ra size <<< "$(du -d 0)" echo """ -Package: linuxqq +Package: ${app_name} Version: ${version} Architecture: amd64 Maintainer: Yutent diff --git a/neovim/package.sh b/neovim/package.sh index 99f7641..bbc5816 100755 --- a/neovim/package.sh +++ b/neovim/package.sh @@ -1,7 +1,7 @@ #!/bin/bash -tmp_dir="/tmp/neovim_tmp" app_name="neovim" +tmp_dir="/tmp/${app_name}_tmp" version="0.9.0-1" release="v0.9.0" @@ -49,7 +49,7 @@ find usr/ -type f | xargs md5sum > DEBIAN/md5sums IFS=$'\t' read -ra size <<< "$(du -d 0)" echo """ -Package: neovim +Package: ${app_name} Version: ${version} Architecture: amd64 Depends: libc6 (>= 2.29), libgcc-s1 (>= 3.3) diff --git a/zellij/package.sh b/zellij/package.sh new file mode 100755 index 0000000..aa34a6a --- /dev/null +++ b/zellij/package.sh @@ -0,0 +1,85 @@ +#!/bin/bash + +app_name="zellij" +tmp_dir="/tmp/${app_name}_tmp" +version="0.37.2" +release="v${version}" + +deb_url="https://github.com/zellij-org/zellij/releases/download/${release}/zellij-x86_64-unknown-linux-musl.tar.gz" + +# 创建临时目录, 用于下载官方包 +if [ -d $tmp_dir ]; then + rm -rf $tmp_dir +fi + +if [ -d "./unpack" ]; then + sudo rm -rf ./unpack +fi + +if [ -f "./${app_name}_${version}.deb" ]; then + rm "./${app_name}_${version}.deb" +fi + +mkdir $tmp_dir + +# 创建临时待打包目录 +echo "创建待打包目录..." +mkdir -p "./unpack/DEBIAN" +mkdir -p "./unpack/usr/bin" +mkdir -p "./unpack/usr/share/applications" + +echo "下载官方原包..." +wget $deb_url -O "${tmp_dir}/zellij-x86_64.tar.gz" + + +echo "下载完成, 解包中..." +tar -xvf "${tmp_dir}/zellij-x86_64.tar.gz" -C $tmp_dir + +echo "解包完成, 复制到待打包目录..." +mv ${tmp_dir}/zellij "./unpack/usr/bin/" + +rm -rf $tmp_dir + +echo "复制完成, 计算文件md5..." + +cd ./unpack + +echo """ +[Desktop Entry] +Version=1.0 +Name=Zellij +Type=Application +Comment=Manage Your Terminal Applications +Terminal=true +Exec=zellij +Icon=zellij +Categories=ConsoleOnly;System; +GenericName=Terminal Multiplexer +""" > usr/share/applications/zellij.desktop + +find usr/ -type f | xargs md5sum > DEBIAN/md5sums + +IFS=$'\t' read -ra size <<< "$(du -d 0)" + +echo """ +Package: ${app_name} +Version: ${version} +Section: devlop +Installed-Size: ${size[0]} +Architecture: amd64 +Maintainer: Yutent +Priority: optional +Homepage: https://zellij.dev/ +Description: A terminal workspace with batteries included. + Zellij is a workspace aimed at developers, ops-oriented people and anyone who loves the terminal. Similar programs are sometimes called "Terminal Multiplexers". + +""" > DEBIAN/control + +echo '计算文件md5完成, 打包中...' + +cd .. +sudo chown -R root:root unpack + +dpkg-deb -b ./unpack "./${app_name}_${version}.deb" + +echo "打包完成 :)"