diff options
author | Louie Shprung <lshprung@tutanota.com> | 2024-09-06 17:04:26 -0400 |
---|---|---|
committer | Louie Shprung <lshprung@tutanota.com> | 2024-09-06 17:04:26 -0400 |
commit | a3caf7f6dddebbb3a59517c9cb803e44f9e9f5f3 (patch) | |
tree | c54cb07e179c993f793f3dc046a5d695b458c11e /actions/build_deb.sh | |
parent | 027bf3ff497ead2ab69d1660e6928eea28530c64 (diff) |
Diffstat (limited to 'actions/build_deb.sh')
-rwxr-xr-x | actions/build_deb.sh | 25 |
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 "$@" |