Skip to content

Commit dc70178

Browse files
authored
make git_apply_patch work for apps as well (#2570)
1 parent 9f58a31 commit dc70178

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,10 +1847,14 @@ printf "%b%s%b\n" "$1" "$2" "$Color_Off"
18471847
}
18481848

18491849
# Apply patch
1850-
# git_apply_patch 15992 server 16.0.2
1850+
# App:
1851+
# git_apply_patch "319" "fulltextsearch_elasticsearch" "27.1.1" "$NCPATH/apps/fulltextsearch_elasticsearch"
1852+
# Server:
1853+
# git_apply_patch "15992" "server" "16.0.2" "$NCPATH"
18511854
# 1 = pull
18521855
# 2 = repository
1853-
# Nextcloud version
1856+
# 3 = Nextcloud version
1857+
# 4 = Folder on system
18541858
git_apply_patch() {
18551859
if [ -z "$NCVERSION" ]
18561860
then
@@ -1860,7 +1864,7 @@ if [[ "$CURRENTVERSION" = "$3" ]]
18601864
then
18611865
curl_to_dir "https://patch-diff.githubusercontent.com/raw/nextcloud/${2}/pull" "${1}.patch" "/tmp"
18621866
install_if_not git
1863-
cd "$NCPATH"
1867+
cd "${4}"
18641868
if git apply --check /tmp/"${1}".patch >/dev/null 2>&1
18651869
then
18661870
print_text_in_color "$IGreen" "Applying patch https://github.com/nextcloud/${2}/pull/${1} ..."

0 commit comments

Comments
 (0)