jar-o / bashapp Goto Github PK
View Code? Open in Web Editor NEWCompile a bash script to a binary and make an OS X Application out of it in one step.
Compile a bash script to a binary and make an OS X Application out of it in one step.
Hi,
I have a shell script which needs to escalate privileges i.e. ask the user for sudo password (I basically install brew, which asks for sudo password)
Is there a way this can be accomplished using bashapp? Everything else works fine so far.
gcc bashapp.c -o bashapp
In file included from bashapp.c:26:
./bashapp.h:326:12: error: implicit declaration of function 'time' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
srand( time(NULL) );
^
bashapp.c:63:16: error: implicit declaration of function 'time' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
srand( time(NULL) );
^
2 errors generated.
Here's the output of lldb's thread backtrace:
(lldb) thread backtrace
* thread #1: tid = 0x149835, 0x00007fff83568812 libsystem_c.dylib`strlen + 18, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x00007fff83568812 libsystem_c.dylib`strlen + 18
frame #1: 0x0000000100001414 bashapp`replace(s=0x0000000100002cc7, olds=0x0000000100002d97, news=0x0000000000000000) + 36 at bashapp.h:118
frame #2: 0x0000000100002318 bashapp`main(argc=2, argv=0x00007fff5fbffc00) + 1528 at bashapp.c:145
frame #3: 0x00007fff875525fd libdyld.dylib`start + 1
(lldb)
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.