belaviyo / send-to-vlc

A Webextension to send streamble media sources to VLC (VideoLAN) media player
http://add0n.com/send-to-vlc.html
Mozilla Public License 2.0
132 stars 37 forks source link

shebang for FreeBSD: bash is at /usr/local/bin/ not at /bin/ #3

Open grahamperrin opened 7 years ago

grahamperrin commented 7 years ago

I fixed the shebang for the installer and for the uninstaller then realised, the installed run.sh also requires correction:

$ date ; uname
Sat 23 Sep 2017 08:18:10 BST
FreeBSD 12.0-CURRENT #0 r320869: Mon Jul 10 13:57:55 UTC 2017 root@releng3.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC 
$ pwd
/home/grahamperrin/Documents/com/github/belaviyo/send-to-vlc
$ which bash
/usr/local/bin/bash
$ ./uninstall.sh 
Native Client id is "com.add0n.native_client"

 .. Removing manifest file for Google Chrome
rm: /home/grahamperrin/.config/google-chrome/NativeMessagingHosts/com.add0n.native_client.json: No such file or directory
 .. Removing manifest file for Chromium
rm: /home/grahamperrin/.config/chromium/NativeMessagingHosts/com.add0n.native_client.json: No such file or directory
 .. Removing manifest file for Mozilla Firefox
rm: /home/grahamperrin/.mozilla/native-messaging-hosts/com.add0n.native_client.json: No such file or directory
 .. Removing executable
rm: /home/grahamperrin/com.add0n.native_client: No such file or directory

>>> Native Client is removed <<<.
$ ./install.sh
/usr/local/bin/node
NodeJS status = 0
Installer is using your system NodeJS.
 -> Root directory is /home/grahamperrin
 -> Creating a directory at /home/grahamperrin/.config/google-chrome/NativeMessagingHosts
 -> Chrome Browser is supported
 -> Creating a directory at /home/grahamperrin/.config/chromium/NativeMessagingHosts
 -> Chromium Browser is supported
 -> Creating a directory at /home/grahamperrin/.config/vivaldi/NativeMessagingHosts
 -> Vivaldi Browser is supported
 -> Creating a directory at /home/grahamperrin/.mozilla/native-messaging-hosts
 -> Firefox Browser is supported
 -> Creating a directory at /home/grahamperrin/com.add0n.native_client                                                                                                    
 => Native Host is installed in /home/grahamperrin/com.add0n.native_client                                                                                                

>>> Application is ready to use <<<                                                                                                                                       

$ cd ~/com.add0n.native_client/
$ ls -hl
total 14
-rw-r--r--  1 grahamperrin  grahamperrin   2.0K 23 Sep 08:19 config.js
-rw-r--r--  1 grahamperrin  grahamperrin   1.7K 23 Sep 08:19 host.js
-rw-r--r--  1 grahamperrin  grahamperrin   3.4K 23 Sep 08:19 messaging.js
-rwxr-xr-x  1 grahamperrin  grahamperrin    39B 23 Sep 08:19 run.sh
$ grep bash run.sh
#!/bin/bash
$ nano run.sh
  GNU nano 2.8.7                                                                  File: run.sh                                                                            

#!/usr/local/bin/bash
/usr/local/bin/node host.js

$ 
grahamperrin commented 7 years ago

After fixing the shebang in run.sh:

andy-portmen commented 7 years ago

Can you confirm this fix works? https://github.com/andy-portmen/native-client/commit/6569223cf9af4140d6a2d7af0a2c13142c88668d

belaviyo commented 7 years ago

@andy-portmen I merged your commit into my native client as well; https://github.com/belaviyo/native-client/commit/1d3dd47ad20debe20120a62b0996e9b604fa522a