|
|
@ -13,15 +13,15 @@ set -e;
|
|
|
|
gpg --quiet --keyserver eu.pool.sks-keyservers.net --recv "$GPG_FINGERPRINT";
|
|
|
|
gpg --quiet --keyserver eu.pool.sks-keyservers.net --recv "$GPG_FINGERPRINT";
|
|
|
|
|
|
|
|
|
|
|
|
function error() {
|
|
|
|
function error() {
|
|
|
|
echo $@ >&2;
|
|
|
|
echo "$@" >&2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function as() {
|
|
|
|
function as() {
|
|
|
|
sudo -u "$GITEA_USER" $@;
|
|
|
|
sudo -u "$GITEA_USER" "$@";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if [ -f "$GITEA_BIN" ]; then
|
|
|
|
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
|
|
|
|
else
|
|
|
|
installed=0;
|
|
|
|
installed=0;
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|