command line - Syntax error: end of file unexpected - Ask Ubuntu


i have shell script use build project on jenkins. when run script on local windows machine runs fine, when run script on ubuntu server gives error

error:

syntax error: end of file unexpected (expecting "}") build step 'execute shell' marked build failure finished: failure 

i using jenkins on both windows local machine , ubuntu server

contents of shell script :

echo 'asklytics-commons-test: cleaning ...' ./gradlew clean || { echo 'gradlew clean --refresh-dependencies failed!!' ; exit 1; }  echo 'asklytics-commons-test: building ...' ./gradlew build || { echo 'gradlew building failed!!' ; exit 1; }  echo 'asklytics-commons-test: jarring...' ./gradlew jar || { echo 'gradlew jarring failed!!' ; exit 1; }  echo 'asklytics-commons-test: publishing ...' ./gradlew publish || { echo 'gradlew publish failed!!' ; exit 1; } 

the shebang line must first thing in file. since use bash features, first line of file must be

#!/bin/bash or #!/usr/bin/env bash.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User