Skip to content

Commit

Permalink
Merge branch 'master' of github.com:codota/tabnine-intellij into defa…
Browse files Browse the repository at this point in the history
…ult-url
  • Loading branch information
amircodota committed Mar 7, 2023
2 parents 0097a35 + c682d21 commit 87a9b6a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/main/java/com/tabnine/binary/fetch/BundledBinaries.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ val ONCE = AtomicBoolean(false)
val targetDir: Path = Paths.get(
System.getProperty(StaticConfig.USER_HOME_PATH_PROPERTY),
StaticConfig.TABNINE_FOLDER_NAME,
"TabnineEnterprise"
"TabnineEnterprise",
Executables::class.java.getResource("/binaries/version").openStream().reader().readText()
)

object Executables {
Expand Down Expand Up @@ -57,11 +58,13 @@ private fun copyOnce() {
val targets = Executables.Target.toList()

bundles.zip(targets).forEach { (bundle, target) ->
Files.copy(
bundle.openStream(),
target.toPath(),
StandardCopyOption.REPLACE_EXISTING
)
if (!target.exists()) {
Files.copy(
bundle.openStream(),
target.toPath(),
StandardCopyOption.REPLACE_EXISTING
)
}
}

targets.forEach { it.setExecutable(true) }
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/binaries/downloadBinaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ do
&& chmod +x * \
&& rm TabNine.zip \
&& rm *local* \
&& rm -f eval \
&& rm -f lsp-wrapper \
&& cd $SCRIPT_DIR
done

echo -n $VERSION > $SCRIPT_DIR/version

0 comments on commit 87a9b6a

Please sign in to comment.