summaryrefslogtreecommitdiff
path: root/actions/build_deb.sh
diff options
context:
space:
mode:
authorLouie Shprung <lshprung@tutanota.com>2024-09-06 17:04:26 -0400
committerLouie Shprung <lshprung@tutanota.com>2024-09-06 17:04:26 -0400
commita3caf7f6dddebbb3a59517c9cb803e44f9e9f5f3 (patch)
treec54cb07e179c993f793f3dc046a5d695b458c11e /actions/build_deb.sh
parent027bf3ff497ead2ab69d1660e6928eea28530c64 (diff)
Update package build scriptsHEADv0.2master
Diffstat (limited to 'actions/build_deb.sh')
-rwxr-xr-xactions/build_deb.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/actions/build_deb.sh b/actions/build_deb.sh
new file mode 100755
index 0000000..7c33067
--- /dev/null
+++ b/actions/build_deb.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env sh
+
+print_help() {
+ echo "Usage: $0 IMAGE_NAME IMAGE_VERSION ARCHIVE_FILE [DEBUILD_ARGS]..."
+}
+
+DEPENDENCY_LIST="autoconf-archive debmake devscripts liblua5.1-0-dev lua5.1 ncurses-dev pkg-config"
+
+# print help if not enough arguments were passed
+if [ $# -lt 3 ]; then
+ print_help
+ exit 1
+fi
+
+IMAGE_NAME="$1"
+shift
+IMAGE_VERSION="$1"
+shift
+ARCHIVE_FILE="$1"
+shift
+
+apt-get -y update
+apt-get -y upgrade
+apt install -y $DEPENDENCY_LIST
+debmake -y -a "$ARCHIVE_FILE" -i debuild "$@"