diff options
author | Jay Berkenbilt <ejb@ql.org> | 2018-02-21 02:36:13 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2018-02-21 02:54:31 +0100 |
commit | 30380b64e37b275854553668a4fa32be7fc4a11d (patch) | |
tree | a72334dea140d4724135aaa9e2dd5ed3fe780a60 /appimage/entrypoint | |
parent | ac4cca7c261fbf8dc2a90f6d5180d9d4ca4be7e4 (diff) | |
download | qpdf-30380b64e37b275854553668a4fa32be7fc4a11d.tar.zst |
Add docker file for building app image
The official, signed AppImage will be build locally for now for
security of my key, but I still want it to be built in a clean,
controlled environment based off a suitably old Linux distribution for
maximal portability in the AppImage.
Diffstat (limited to 'appimage/entrypoint')
-rwxr-xr-x | appimage/entrypoint | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/appimage/entrypoint b/appimage/entrypoint new file mode 100755 index 00000000..458a3acf --- /dev/null +++ b/appimage/entrypoint @@ -0,0 +1,22 @@ +#!/bin/bash +set -e +if [ $(id -u) = 0 ]; then + if [ ! -d /tmp/build/.gnupg ]; then + echo "/tmp/build must exist and must contain .gnupg" + exit 2 + fi + id=$(stat -c %u /tmp/build) + adduser --home /tmp/build --no-create-home --uid $id --disabled-password --gecos build build + exec sudo -iu build $0 "$@" +fi + +cd /tmp/build +if [ ! -d qpdf ]; then + if [ "$1" == "" ]; then + echo "A repository and optional git clone arguments must be given" + exit 2 + fi + git clone "$@" qpdf +fi +cd qpdf +./appimage/build-appimage --sign |