diff --git a/lib.sh b/lib.sh index bfd99e39..4916eae2 100644 --- a/lib.sh +++ b/lib.sh @@ -1052,6 +1052,21 @@ print_text_in_color() { printf "%b%s%b\n" "$1" "$2" "$Color_Off" } +# Patch upload bug +# git_apply_patch 15992 server +# 1 = pull +# 2 = repository +git_apply_patch() { +curl_to_dir "https://patch-diff.githubusercontent.com/raw/nextcloud/${2}/pull" "${1}.patch" "/tmp" +install_if_not git +cd "$NCPATH" +if git apply --check /tmp/"${1}".patch >/dev/null 2>&1 +then + print_text_in_color "IGreen" "Applying patch ${1} from the ${2} repository..." + git apply /tmp/"${1}".patch +fi +} + ## bash colors # Reset Color_Off='\e[0m' # Text Reset diff --git a/nextcloud_update.sh b/nextcloud_update.sh index 73cca8be..6fd5b73d 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -235,6 +235,9 @@ fi # Replace the permissions script run_static_script setup_secure_permissions_nextcloud +###### TEMPORARY 2019-07-06 ########### +git_apply_patch 15992 server ## 16.0.2 + # Set secure permissions if [ ! -f "$SECURE" ] then