Saturday 15 June 2013

How to convert bash file to a binary executable -


I made binary executables on the bash script on the Linux server via SAPC. Binary works fine on linux machines, but how can I change my Bash file to binary executable via a mistake on Mac which is capable of running everywhere (Ubuntu, CentOS, Mac, Cygwin)?

  shc -v -r -t -f ir16fetcher.sh mv ir16fetcher .sh.x ir16fetcher   

My Bash script's Shebang < Pre> #! / Bin / bash

Machine on Linux

  ./ir16installer Usage: ir16fetcher & lt; Servername / ip address & gt; [N The latest build - optional. Default 1] Example: ir16fetcher jagger 2 Example: ir16fetcher 167.116.6.155 Requirements: Please make sure the conf file in the installation folder ~ / IRinstall / ir16 & amp;   

on my Mac

  ./ir16installer -bash: ./ir16installer: Can not execute the binary file    / Pre>  

You have to do this for every architecture and operating system that you need to support. In any case, there really is no benefit to using this method for distribution. It adds dependency and makes delivery complicated, and I'm pretty sure that whatever is obscure, the "shc" compiler tool is easily reversed.

No comments:

Post a Comment