|
|
|
@ -13,15 +13,15 @@ set -e;
|
|
|
|
|
gpg --quiet --keyserver eu.pool.sks-keyservers.net --recv "$GPG_FINGERPRINT";
|
|
|
|
|
|
|
|
|
|
function error() {
|
|
|
|
|
echo $@ >&2;
|
|
|
|
|
echo "$@" >&2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function as() {
|
|
|
|
|
sudo -u "$GITEA_USER" $@;
|
|
|
|
|
sudo -u "$GITEA_USER" "$@";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if [ -f "$GITEA_BIN" ]; then
|
|
|
|
|
installed=$(cd "$GITEA_DIR" && as "$GITEA_BIN" --version | grep --only-matching --perl-regexp "(?<=version )\d+(\.\d+)*(?= )");
|
|
|
|
|
installed=$(cd "$GITEA_DIR" && as "$GITEA_BIN" --version | grep --only-matching --perl-regexp '(?<=version )\d+(\.\d+)*(?= )');
|
|
|
|
|
else
|
|
|
|
|
installed=0;
|
|
|
|
|
fi
|
|
|
|
|