Skip to content

Commit

Permalink
fix launcher issues
Browse files Browse the repository at this point in the history
  • Loading branch information
TrustedSec committed Apr 26, 2018
1 parent d7121cd commit 344fac5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ptf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def create_launcher():
"""
cwd = os.getcwd()
filewrite = open("/usr/local/bin/ptf", "w")
filewrite.write("#!/bin/sh\ncd %s\nchmod +x ptf\n./ptf $*" % (cwd))
filewrite.write('#!/bin/sh\ncd %s\nchmod +x ptf\n./ptf "$@"' % (cwd))
filewrite.close()
subprocess.Popen("chmod +x /usr/local/bin/ptf", shell=True).wait()

Expand Down
6 changes: 6 additions & 0 deletions readme/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
~~~~~~~~~~~~~~~~~
version 2.0
~~~~~~~~~~~~~~~~~

* fix launchers with $@ instead of $*

~~~~~~~~~~~~~~~~~
version 1.18
~~~~~~~~~~~~~~~~~
Expand Down
5 changes: 2 additions & 3 deletions src/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,13 +380,12 @@ def launcher(filename, install_location):
# if we found filetype
if point != "":
filewrite = open("/usr/local/bin/" + launchers, "w")
filewrite.write('#!/bin/sh\n[ -x %s%s ] || chmod +x %s%s\n%s%s $*\n' %
filewrite.write('#!/bin/sh\n[ -x %s%s ] || chmod +x %s%s\n%s%s "$@"\n' %
(install_location, file_point, install_location, file_point, install_location, file_point))
filewrite.close()
subprocess.Popen("chmod +x /usr/local/bin/%s" %
(launchers), shell=True).wait()
print_status(
"Created automatic launcher, you can run the tool from anywhere by typing: " + launchers)
print_status("Created automatic launcher, you can run the tool from anywhere by typing: " + launchers)

# just need to do this once
if base_launcher == 1:
Expand Down

0 comments on commit 344fac5

Please sign in to comment.