summaryrefslogtreecommitdiff
path: root/actions/build_deb.sh
diff options
context:
space:
mode:
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 "$@"