2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-17 01:55:09 +00:00
qpdf/appimage/entrypoint
Jay Berkenbilt 30380b64e3 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.
2018-02-20 20:54:31 -05:00

23 lines
563 B
Bash
Executable File

#!/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