Skip to content

Commit

Permalink
Merge pull request #280 from ne20002/fix/279
Browse files Browse the repository at this point in the history
Prevent deleting the files in /config when downloading newest sources
  • Loading branch information
MrPetovan authored Jan 31, 2025
2 parents d1cca22 + 6e317fd commit ad886c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docker-entrypoint-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_

echo "Download sources for ${FRIENDICA_VERSION} (Addon: ${FRIENDICA_ADDONS})"

# Removing the whole directory first
rm -fr /usr/src/friendica
# Removing the previous sources (except config) first
find /usr/src/friendica -mindepth 1 -maxdepth 1 ! -name 'config' -exec rm -rf {} +
export GNUPGHOME="$(mktemp -d)"

gpg --batch --logger-fd=1 --no-tty --quiet --keyserver keyserver.ubuntu.com --recv-keys 08656443618E6567A39524083EE197EF3F9E4287
Expand All @@ -28,6 +28,8 @@ if (expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]) && [ "${FRIENDICA_

tar -xzf friendica-full-${FRIENDICA_VERSION}.tar.gz -C /usr/src/
rm friendica-full-${FRIENDICA_VERSION}.tar.gz friendica-full-${FRIENDICA_VERSION}.tar.gz.asc
cp -an /usr/src/friendica/config/* /usr/src/friendica-full-${FRIENDICA_VERSION}/config/
rm -fr /usr/src/friendica
mv -f /usr/src/friendica-full-${FRIENDICA_VERSION}/ /usr/src/friendica
echo "Core sources (${FRIENDICA_VERSION}) extracted"

Expand Down

0 comments on commit ad886c0

Please sign in to comment.