mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
add git_apply_patch() (#866)
This commit is contained in:
parent
db3b2d6264
commit
52addfe220
15
lib.sh
15
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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user