Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nick863 committed Oct 16, 2023
1 parent 1b50905 commit 8e185e4
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions thirdparty_build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,14 @@ task downloadDjvu {
doLast {
def djvuFolder = new File(djvu)
if (djvuFolder.exists()) {
// Clean previous checkout
// Switch to master so we can properly pull if it was
// detached.
exec {
commandLine = ['git', '-C', djvu, 'checkout', '.']
}
// Switch to master
exec {
commandLine = ['git', '-C', djvu, 'checkout', 'master']
commandLine = ['git', '-C', djvu, 'checkout', '-f', 'master']
}
// Pull
exec {
commandLine = ['git', '-C', djvu, 'pull']
commandLine = ['git', '-C', djvu, 'fetch', 'origin']
}
}
else {
Expand Down Expand Up @@ -71,17 +68,14 @@ task downloadMupdf {
doLast {
def mupdfFolder = new File(mupdf)
if (mupdfFolder.exists()) {
// Clean previous checkout
exec {
commandLine = ['git', '-C', mupdf, 'checkout', '.']
}
// Switch to master
// Switch to master so we can properly pull if it was
// detached.
exec {
commandLine = ['git', '-C', mupdf, 'checkout', 'master']
commandLine = ['git', '-C', mupdf, 'checkout', '-f', 'master']
}
// Pull
exec {
commandLine = ['git', '-C', mupdf, 'pull']
commandLine = ['git', '-C', mupdf, 'fetch', 'origin']
}
}
else {
Expand Down

0 comments on commit 8e185e4

Please sign in to comment.