mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 13:39:19 -05:00
14f16d6c2e
* Modify tbraeutigam/gogs-snap for gitea * Fix building on 16.04 (manually build go-bindata). -> add _source.tar.bz2 to .gitignore (used by snapcraft cleanbuild) * Streamline Snap packaging: - Take advantage of install-hooks (snapd 2.27) - Use snapctl configuration storage for unchanging values * Move to using Snap Hooks for configuration * Missed re-adding daemon statement * Fix two warnings from Codacy.
23 lines
549 B
Bash
Executable file
23 lines
549 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if ! env | grep -q root; then
|
|
echo "
|
|
+----------------------------------------+
|
|
| You are not running gitea as root. |
|
|
| This is required for the snap package. |
|
|
| Please re-run as root. |
|
|
+----------------------------------------+
|
|
"
|
|
$SNAP/gitea/gitea --help
|
|
exit 1
|
|
fi
|
|
|
|
# Set usernames for gitea
|
|
export USERNAME=root
|
|
export USER=root
|
|
|
|
export GITEA_WORK_DIR=$(snapctl get gitea.snap.workdir)
|
|
export GITEA_CUSTOM=$(snapctl get gitea.snap.custom)
|
|
|
|
$SNAP/bin/gconfig save
|
|
cd $SNAP/gitea; ./gitea $@
|