Skip to content
This repository was archived by the owner on Nov 9, 2020. It is now read-only.

Commit 342e377

Browse files
author
last-khadjiit
committed
add bash file creation for app startup
1 parent 688f246 commit 342e377

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ def tempDistFolder = 'build/tmp-dist/'
77
def confFolder = 'conf/'
88
def dbFolder = 'build/tmp-dist/db/'
99
def distConfFolder = 'build/tmp-dist/conf/'
10-
def startupFileName = 'startup.bat'
10+
def startupBatFileName = 'startup.bat'
11+
def startupShFileName = 'startup.sh'
12+
def startupShFileHead = '#!/bin/sh\n'
1113
def startupScript = 'java -Dtinylog.configuration=conf/tinylog.properties -jar ' + project.name + '-' + version + '.jar'
1214
def distFolder = 'build/dist'
1315

@@ -32,9 +34,12 @@ task copyConf(dependsOn: copyJar, type: Copy) {
3234

3335
task dist(dependsOn: copyConf, type:Zip) {
3436
doFirst{
35-
def f1 = new File(tempDistFolder+startupFileName)
37+
def f1 = new File(tempDistFolder+startupBatFileName)
3638
f1.text = startupScript
3739

40+
def f2 = new File(tempDistFolder+startupShFileName)
41+
f2.text = startupShFileHead+startupScript
42+
3843
includeEmptyDirs = true
3944
new File(dbFolder).mkdirs()
4045
}

0 commit comments

Comments
 (0)