[X2Go-Commits] [x2goserver] 04/17: x2goserver/bin/x2gopath.in: use ${BASH_SOURCE[0]} instead of ${0}... for reasons.

git-admin at x2go.org git-admin at x2go.org
Sun Jun 23 04:43:04 CEST 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goserver.

commit 16c8bb52dd60689985fe5f133869f594cef9ad4b
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Jun 22 02:55:26 2019 +0200

    x2goserver/bin/x2gopath.in: use ${BASH_SOURCE[0]} instead of ${0}... for reasons.
---
 debian/changelog           | 2 ++
 x2goserver/bin/x2gopath.in | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 3375d08..12536fb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -90,6 +90,8 @@ x2goserver (4.1.0.4-0x2go1.1) UNRELEASED; urgency=medium
     - x2goserver/Makefile: allow auto-generation of files, including
       installation, uninstallation and cleanup.
     - x2goserver/bin: rename x2gopath to x2gopath.in.
+    - x2goserver/bin/x2gopath.in: use ${BASH_SOURCE[0]} instead of ${0}... for
+      reasons.
   * debian/control:
     + Build-depend upon lsb-release for distro version detection.
   * debian/x2goserver.manpages:
diff --git a/x2goserver/bin/x2gopath.in b/x2goserver/bin/x2gopath.in
index eda166c..485b6ee 100755
--- a/x2goserver/bin/x2gopath.in
+++ b/x2goserver/bin/x2gopath.in
@@ -21,8 +21,8 @@
 # Free Software Foundation, Inc.,
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
-base="${0%/*}";
-if test "$base" = "$0"; then
+base="${BASH_SOURCE[0]%/*}"
+if test "${base}" = "${BASH_SOURCE[0]}"; then
 	base=".";
 fi;
 

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git


More information about the x2go-commits mailing list