Mercurial > hg > control-images
view images/hello-world/build.sh @ 9:242a1e03ce15 1.1.0
Move repeated wrapper code into top level build.sh.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 18 Sep 2011 18:03:47 -0500 |
parents | 1a7e1616ab9d |
children |
line wrap: on
line source
#!/bin/bash # Simple self-contained build control image creation script. Doesn't use # the bootstrap skeleton, instead compiles and runs the threaded "hello world" # program from the Aboriginal Linux /usr/src directory as a build environment # smoketest. Grep the output for "Hello world!" to test for success. # Write init script via a "here" document. cat > "$WORK"/init << 'EOF' || dienow #!/bin/bash echo Started second stage init cd /home && gcc -lpthread /usr/src/thread-hello2.c -o hello && ./hello # Upload our hello world file to the output directory (named hello-$HOST). # No reason, just an example. ftpput $FTP_SERVER -P $FTP_PORT hello-$HOST hello sync EOF chmod +x "$WORK"/init || dienow