yatima1460 / Drill

Search files without indexing, but fast crawling
https://drill.software/
GNU General Public License v2.0
269 stars 21 forks source link

The program doesn't run when using the fish terminal #44

Closed gabdub closed 5 years ago

gabdub commented 5 years ago

Linux distro Ubuntu Mate 19.04

Build Version Drill-ui-linux-1.199-x86_64.deb

Describe the bug The program doesn't run when using the fish terminal. The file "/usr/bin/drill-search" doesn't have "#!/bin/bash" in the first line.

Other notes "$1" is missing in Drill/build.bash line 353 (...DEBFILE/usr/bin/$DEB_PACKAGE_NAME)

# install binary redirect for /usr/bin and set it executable
    mkdir -p DEBFILE/"$1"/usr/bin
    echo    #!/bin/bash                                     >  DEBFILE/usr/bin/$DEB_PACKAGE_NAME
    echo    /opt/$DEB_PACKAGE_NAME/"$EXECUTABLE_IN_OPT" "\$@" >> DEBFILE/"$1"/usr/bin/$DEB_PACKAGE_NAME
chmod +x DEBFILE/"$1"/usr/bin/$DEB_PACKAGE_NAME
yatima1460 commented 5 years ago

I knew I couldn't trust

echo #!/bin/bash > DEBFILE/usr/bin/$DEB_PACKAGE_NAME

Will fix soon

gabdub commented 5 years ago

Nice. That was fast!

yatima1460 commented 5 years ago

don't close the issue, until I commit a fix, so I don't forget!

yatima1460 commented 5 years ago

I actually searched around and couldn't find a way to escape "#"

I think I will just include the bin/script as a real file and not generate it with echo

gabdub commented 5 years ago

Have you tried something like this?

echo -e '\x23!/bin/bash'

yatima1460 commented 5 years ago

you are the absolute madman, it works

RustyRaptor commented 5 years ago

fsh