Skip to content

Commit

Permalink
add user write permissions to jvm legal files
Browse files Browse the repository at this point in the history
  • Loading branch information
craigraw committed Apr 18, 2024
1 parent a505011 commit 2354b06
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,18 @@ jlink {
}
}

tasks.jpackage.finalizedBy "addUserWritePermission"

task addUserWritePermission(type: Exec) {
if(os.windows) {
commandLine 'icacls', "$buildDir\\jpackage\\Sparrow\\runtime\\legal\\*"
} else if(os.macOsX) {
commandLine 'chmod', '-R', 'u+w', "$buildDir/jpackage/Sparrow.app/Contents/runtime/Contents/Home/legal"
} else {
commandLine 'chmod', '-R', 'u+w', "$buildDir/jpackage/Sparrow/lib/runtime/legal"
}
}

task removeGroupWritePermission(type: Exec) {
commandLine 'chmod', '-R', 'g-w', "$buildDir/jpackage/Sparrow"
}
Expand Down

0 comments on commit 2354b06

Please sign in to comment.