Skip to content

Commit

Permalink
Use env to locate the shell, provides compatibility with NixOS etc
Browse files Browse the repository at this point in the history
  • Loading branch information
adamretter authored and khmarbaise committed Apr 27, 2019
1 parent 0e83ade commit ddb9d18
Show file tree
Hide file tree
Showing 23 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#! /bin/sh
#!/usr/bin/env sh

BASEDIR=`dirname "$0"`/..
BASEDIR=`(cd "$BASEDIR"; pwd)`
cd "$BASEDIR"

chmod +x bin/*
chmod +x lib/*
chmod +x lib/*
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/env sh

# From unixJswScriptTemplate

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh

#from unixScriptTemplate
@LICENSE_HEADER@
Expand Down
2 changes: 1 addition & 1 deletion appassembler-maven-plugin/src/main/patches/sh.script.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/env sh

#
# Copyright (c) 1999, 2006 Tanuki Software Inc.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh

export DAEMONDIR=`dirname $0`
export DAEMONDIR=`(cd "$DAEMONDIR"; pwd)`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
@LICENSE_HEADER@

# resolve links - $0 may be a softlink
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/env sh

# From unixJswScriptTemplateSample

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh

#from unixScriptTemplateSample
@LICENSE_HEADER@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Program Arguments
Based on the above configuration your generated script will look like this (only an excerpt):

+--------------------------
#!/bin/sh
#!/usr/bin/env sh
.
.
exec "$JAVACMD" $JAVA_OPTS \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ JVM Settings
The generated script (in this case Unix) will look like the following (license header removed):

+--------------------------
#!/bin/sh
#!/usr/bin/env sh
..
..
BASEDIR=`dirname $0`/..
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ License Header
the generated scripts contain a default license header like the following:

+--------------------------
#!/bin/sh
#!/usr/bin/env sh
# ----------------------------------------------------------------------------
# Copyright 2001-2006 The Apache Software Foundation.
#
Expand Down
2 changes: 1 addition & 1 deletion appassembler-maven-plugin/src/site/fml/faq.fml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</p>

<source>
#!/bin/sh
#!/usr/bin/env sh

# The following two lines are used by the chkconfig command. Change as is
# appropriate for your application. They should remain commented.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
# ----------------------------------------------------------------------------
# Copyright 2001-2006 The Apache Software Foundation.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/env sh

#
# Copyright (c) 1999, 2006 Tanuki Software Inc.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/env sh

#
# Copyright (c) 1999, 2006 Tanuki Software Inc.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/env sh

#
# Copyright (c) 1999, 2006 Tanuki Software Inc.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/env sh

#
# Copyright (c) 1999, 2006 Tanuki Software Inc.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/sh
#!/usr/bin/env sh

#
# Copyright (c) 1999, 2006 Tanuki Software Inc.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
# ----------------------------------------------------------------------------
# Copyright 2001-2006 The Apache Software Foundation.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
# ----------------------------------------------------------------------------
# Copyright 2001-2006 The Apache Software Foundation.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
# ----------------------------------------------------------------------------
# Copyright 2001-2006 The Apache Software Foundation.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
# ----------------------------------------------------------------------------
# Copyright 2001-2006 The Apache Software Foundation.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
# ----------------------------------------------------------------------------
# Copyright 2001-2006 The Apache Software Foundation.
#
Expand Down

0 comments on commit ddb9d18

Please sign in to comment.