From 96af23e9a2463cfb7450c6c297dbd31dec121c50 Mon Sep 17 00:00:00 2001 From: ntimo Date: Sun, 25 Aug 2019 16:41:52 +0200 Subject: [PATCH] [Updater] Save diff files into subdirectory --- .gitignore | 2 +- update.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4884637c3..2f99d62f7 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,7 @@ data/conf/portainer/ data/gitea/ data/gogs/ data/conf/sogo/plist_ldap -diff_before_update_* +update_diffs/ .github/ docker-compose.override.yml refresh_images.sh diff --git a/update.sh b/update.sh index 299858a02..e6dfccca5 100755 --- a/update.sh +++ b/update.sh @@ -328,8 +328,11 @@ if [[ ! "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then exit 0 fi -DIFF_FILE=diff_before_update_$(date +"%Y-%m-%d-%H-%M-%S") +DIFF_DIRECTORY=update_diffs +DIFF_FILE=${DIFF_DIRECTORY}/diff_before_update_$(date +"%Y-%m-%d-%H-%M-%S") echo -e "\e[32mSaving diff to ${DIFF_FILE}...\e[0m" +mkdir -p ${DIFF_DIRECTORY} +mv diff_before_update* ${DIFF_DIRECTORY}/ 2> /dev/null git diff --stat > ${DIFF_FILE} git diff >> ${DIFF_FILE}