From fd3e67063b02e9c732e5825d4961cb69ee1c5a9c Mon Sep 17 00:00:00 2001 From: 0xAhmad Date: Fri, 25 Oct 2024 14:39:59 +0000 Subject: [PATCH] chore(build): add deb package build script --- build_deb.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 build_deb.sh diff --git a/build_deb.sh b/build_deb.sh new file mode 100755 index 0000000..66ecf1e --- /dev/null +++ b/build_deb.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env sh + +while getopts ":v:a:" option; do + case $option in + v) + version="$OPTARG" + ;; + a) + arch="$OPTARG" + ;; + \?) + echo "Invalid option" + exit + ;; + esac +done + +arch_alias() { + case $1 in + "aarch64-linux-android") + echo "aarch64" + ;; + "i686-linux-android") + echo "i686" + ;; + "x86_64-linux-android") + echo "x86_64" + ;; + "arm-linux-androideabi") + echo "arm" + ;; + ?) + echo "Invalid architecture name" + ;; + esac +} + +termux-create-package --pkg-version $version pkg/`arch_alias $arch`.json