Fixed bashism 'source'

This commit is contained in:
Uli Heller
2015-06-27 06:14:06 +02:00
parent c4a682773c
commit b2e1e1796d
4 changed files with 16 additions and 3 deletions

13
README-bashism.md Normal file
View File

@@ -0,0 +1,13 @@
Running `./sbt.sh` emits `./sbt.sh: 2: ./sbt.sh: source: not found`
====
This is due to the usage of `source` within the scripts.
There are two potential fixes:
* Change `#!/bin/sh` to `#!/bin/bash`
* Change `source` to `.`
I'm doing the ladder one...
* `find . -name "*.sh*|xargs -n1 sed -i "s/source /. /"`

View File

@@ -1,5 +1,5 @@
#!/bin/sh
source ../env.sh
. ../env.sh
cd ../
./sbt.sh clean assembly

View File

@@ -1,3 +1,3 @@
#!/bin/sh
source ../env.sh
. ../env.sh
ant -f build.xml all

2
sbt.sh
View File

@@ -1,3 +1,3 @@
#!/bin/sh
source ./env.sh
. ./env.sh
java -Dsbt.log.noformat=true -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m -Xmx512M -Xss2M -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar `dirname $0`/sbt-launch-0.13.8.jar "$@"