File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
src/main/kotlin/kscript/app Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 11.gradle
22build /
33target /
4+ out /
45
56# Ignore Gradle GUI config
67gradle-app.setting
Original file line number Diff line number Diff line change @@ -76,9 +76,22 @@ fun main(args: Array<String>) {
7676 if (docopt.getBoolean((" self-update" ))) {
7777 if (evalBash(" which kscript | grep .sdkman" ).stdout.isNotBlank()) {
7878 info(" Installing latest version of kscript..." )
79- println (" sdkman_auto_answer=true && sdk install kscript" )
79+ // println("sdkman_auto_answer=true && sdk install kscript")
80+
81+ // create update script
82+ val updateScript = File (KSCRIPT_CACHE_DIR , " self_update.sh" ).apply {
83+ writeText("""
84+ source ${" $" } {HOME}/.bash_profile
85+ sdk --help
86+ sdkman_auto_answer=true && sdk install kscript
87+ """ .trimIndent())
88+ setExecutable(true )
89+ }
90+
91+ println (updateScript.absolutePath)
8092 } else {
8193 info(" Self-update is currently just supported via sdkman." )
94+ info(" Please download a new release from https://github.com/holgerbrandl/kscript" )
8295 // todo port sdkman-indpendent self-update
8396 }
8497
You can’t perform that action at this time.
0 commit comments