Fix CLI wrapper and rename CLI tool to eesyphp
This commit is contained in:
parent
63bab08c48
commit
21e4bc935d
3 changed files with 11 additions and 8 deletions
11
bin/eesyphp.wrapper
Executable file
11
bin/eesyphp.wrapper
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
USER=$( basename $0 )
|
||||
REAL_BIN=$( realpath -L $0|sed 's/\.wrapper$//' )
|
||||
if [ "$( id -u -n )" != "$USER" ]
|
||||
then
|
||||
sudo -u $USER $REAL_BIN $@
|
||||
exit $?
|
||||
fi
|
||||
$REAL_BIN $@
|
||||
exit $?
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$( id -u -n )" != "$( basename $0 )" ]
|
||||
then
|
||||
sudo -u $( basename $0 ) $0 $@
|
||||
exit $?
|
||||
fi
|
||||
$( realpath -L $0|sed 's/\.wrapper$//' ) $@
|
Loading…
Reference in a new issue