Mercurial > hg > aboriginal
view sources/native-builds/hello-world.sh @ 1111:6b20e20bb291
Vary $WORK directory so making multiple control images in parallel with FORK=1 doesn't conflict.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 13 Jun 2010 22:54:25 -0500 |
parents | 0fe8eda4f002 |
children | b41dbea3ba14 |
line wrap: on
line source
#!/bin/bash # Download all the source tarballs we haven't got up-to-date copies of. # The tarballs are downloaded into the "packages" directory, which is # created as needed. source sources/include.sh || exit 1 [ $# -ne 1 ] && echo "usage: $0 FILENAME" >&2 && exit 1 [ -e "$1" ] && echo "$1 exists" && exit 0 # Set up working directories WORK="$WORK"/hello-world blank_tempdir "$WORK" 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 cd "$TOP" mksquashfs "$WORK" "$1" -noappend -all-root