Blame otp-0008-Avoid-forking-sed-to-get-basename.patch

bd508a
From: Jan Pazdziora <jpazdziora@redhat.com>
bd508a
Date: Thu, 10 May 2018 18:35:02 +0200
bd508a
Subject: [PATCH] Avoid forking sed to get basename.
bd508a
bd508a
bd508a
diff --git a/erts/etc/unix/erl.src.src b/erts/etc/unix/erl.src.src
d8da3b
index 0983132ac1..6b55e8f0f3 100644
bd508a
--- a/erts/etc/unix/erl.src.src
bd508a
+++ b/erts/etc/unix/erl.src.src
d8da3b
@@ -26,7 +26,7 @@ else
d8da3b
 fi
bd508a
 BINDIR=$ROOTDIR/erts-%VSN%/bin
bd508a
 EMU=%EMULATOR%%EMULATOR_NUMBER%
bd508a
-PROGNAME=`echo $0 | sed 's/.*\///'`
bd508a
+PROGNAME=${0##*/}
bd508a
 export EMU
bd508a
 export ROOTDIR
bd508a
 export BINDIR
bd508a
diff --git a/erts/etc/unix/start_erl.src b/erts/etc/unix/start_erl.src
bd508a
index 34e0369710..62e613bba1 100644
bd508a
--- a/erts/etc/unix/start_erl.src
bd508a
+++ b/erts/etc/unix/start_erl.src
bd508a
@@ -37,7 +37,7 @@ VSN=`awk '{print $2}' $DataFile`
bd508a
 
bd508a
 BINDIR=$ROOTDIR/erts-$ERTS_VSN/bin
bd508a
 EMU=beam
bd508a
-PROGNAME=`echo $0 | sed 's/.*\///'`
bd508a
+PROGNAME=${0##*/}
bd508a
 export EMU
bd508a
 export ROOTDIR
bd508a
 export BINDIR