49 lines
1.3 KiB
Bash
Executable File
49 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
if [ "${1:-}" = "" ]
|
|
then
|
|
echo "[!] no lisp files provided, exiting." > /dev/stderr
|
|
exit 1
|
|
fi
|
|
|
|
LISP=$1
|
|
NAME=$(basename "$1" .lisp)
|
|
shift
|
|
|
|
sbcl --load "$LISP" \
|
|
--eval "(sb-ext:save-lisp-and-die \"$NAME\"
|
|
:executable t
|
|
:save-runtime-options t
|
|
:toplevel '$NAME:toplevel)"
|
|
|
|
cat <<EOF
|
|
____ _ _ _ ____ _____ ____ ________ _ _ _____
|
|
| _ \ / \ | \ | |/ ___| ____| _ \ |__ / _ \| \ | | ____|
|
|
| | | |/ _ \ | \| | | _| _| | |_) | / / | | | \| | _|
|
|
| |_| / ___ \| |\ | |_| | |___| _ < / /| |_| | |\ | |___
|
|
|____/_/ \_\_| \_|\____|_____|_| \_\/____\___/|_| \_|_____|
|
|
|
|
EOF
|
|
|
|
|
|
# D A N G E R Z O N E
|
|
# Beepy needs this because the firmware files are owned by root.
|
|
# When building on macOS, I need need to make sure it works with
|
|
# some test-files.
|
|
if [ "$(uname -s)" = "Linux" ]
|
|
then
|
|
cat <<EOF
|
|
____ _ _ _ ____ _____ ____ ________ _ _ _____
|
|
| _ \ / \ | \ | |/ ___| ____| _ \ |__ / _ \| \ | | ____|
|
|
| | | |/ _ \ | \| | | _| _| | |_) | / / | | | \| | _|
|
|
| |_| / ___ \| |\ | |_| | |___| _ < / /| |_| | |\ | |___
|
|
|____/_/ \_\_| \_|\____|_____|_| \_\/____\___/|_| \_|_____|
|
|
|
|
EOF
|
|
echo "[+] warning: setting up ${NAME} with sticky-root permissions!"
|
|
sudo chown root:root ${NAME}
|
|
sudo chmod +s ${NAME}
|
|
fi
|