fix: remove cd command
This commit is contained in:
@@ -33,7 +33,6 @@ usermod --groups postgres,valkey --append gitea
|
|||||||
# Download and install gitea binary
|
# Download and install gitea binary
|
||||||
export ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
|
export ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
|
||||||
export GITEA_BINARY=gitea-1.25.5-linux-$ARCH
|
export GITEA_BINARY=gitea-1.25.5-linux-$ARCH
|
||||||
cd %{_tmppath}
|
|
||||||
wget --output-document $GITEA_BINARY https://dl.gitea.com/gitea/1.25.5/$GITEA_BINARY
|
wget --output-document $GITEA_BINARY https://dl.gitea.com/gitea/1.25.5/$GITEA_BINARY
|
||||||
wget --output-document $GITEA_BINARY.asc %{_tmppath} https://dl.gitea.com/gitea/1.25.5/$GITEA_BINARY.asc
|
wget --output-document $GITEA_BINARY.asc %{_tmppath} https://dl.gitea.com/gitea/1.25.5/$GITEA_BINARY.asc
|
||||||
gpg --keyserver hkps://keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2
|
gpg --keyserver hkps://keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2
|
||||||
@@ -55,7 +54,7 @@ export GITEA_LUGIT_THEME=gitea-lugit-theme
|
|||||||
wget --output-document $GITEA_LUGIT_THEME.tar.gz https://github.com/lucas-labs/gitea-lugit-theme/releases/download/v1.0.1/$GITEA_LUGIT_THEME.tar.gz
|
wget --output-document $GITEA_LUGIT_THEME.tar.gz https://github.com/lucas-labs/gitea-lugit-theme/releases/download/v1.0.1/$GITEA_LUGIT_THEME.tar.gz
|
||||||
runuser --user=gitea -- tar --extract --gzip --overwrite --directory=%{_sharedstatedir}/gitea/custom --file %{_tmppath}/$GITEA_LUGIT_THEME.tar.gz
|
runuser --user=gitea -- tar --extract --gzip --overwrite --directory=%{_sharedstatedir}/gitea/custom --file %{_tmppath}/$GITEA_LUGIT_THEME.tar.gz
|
||||||
runuser --user=gitea -- mv %{_tmppath}/gitea_images/* %{_sharedstatedir}/gitea/custom/public/assets/img
|
runuser --user=gitea -- mv %{_tmppath}/gitea_images/* %{_sharedstatedir}/gitea/custom/public/assets/img
|
||||||
rm --recursive gitea_images
|
rm --recursive %{_tmppath}/gitea_images
|
||||||
|
|
||||||
# Create postgres user and db
|
# Create postgres user and db
|
||||||
if ! runuser --user=postgres -- psql --quiet --tuples-only --command='\du' | grep --quiet gitea; then
|
if ! runuser --user=postgres -- psql --quiet --tuples-only --command='\du' | grep --quiet gitea; then
|
||||||
|
|||||||
Reference in New Issue
Block a user