Skip to content

Instantly share code, notes, and snippets.

@sschr15
Created November 28, 2022 03:35
Show Gist options
  • Save sschr15/326a6e7486415dc8b0870f3e33796f14 to your computer and use it in GitHub Desktop.
Save sschr15/326a6e7486415dc8b0870f3e33796f14 to your computer and use it in GitHub Desktop.
xkcd 149
# make me a sandwich
# a small makefile following xkcd 149: "Sandwich"
all:
@rm .me .a 2>/dev/null; \
exit 0
me:
@touch .me
a:
@touch .a
sandwich:
@if [ -f .me ] && [ -f .a ]; then \
if [ $$(whoami) != "root" ]; then \
echo "What? Make it yourself."; \
else \
echo "Okay."; \
echo "🥪" > sandwich.txt; \
fi; \
else \
printf "\033[0;31mError: incomplete command\033[0m\n"; \
exit 0; \
fi; \
rm .me .a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment