snips.sh

 1#!/bin/bash
 2
 3# Builder Setup
 4set -e
 5source $stdenv/setup
 6
 7# Program Setup
 8BIN_DIR="$out/bin"
 9PROG_FILENAME="hello-world"
10mkdir -p "$BIN_DIR"
11
12PROGRAM_OUT="$BIN_DIR/$PROG_FILENAME"
13
14# Program Script
15echo "#!/bin/bash"          >> $PROGRAM_OUT
16echo ""                     >> $PROGRAM_OUT
17echo "set -e"               >> $PROGRAM_OUT
18echo "echo 'Hello, World!'" >> $PROGRAM_OUT
19
20chmod +x $PROGRAM_OUT