Skip to content

Instantly share code, notes, and snippets.

@wayneeseguin
Forked from adrianrf/bdsm-test.sh
Created August 3, 2011 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wayneeseguin/1123743 to your computer and use it in GitHub Desktop.
Save wayneeseguin/1123743 to your computer and use it in GitHub Desktop.
bdsm-test.sh script as I try out BDSM
#!/usr/bin/env bdsm
modules bdsm/filesystem # We're going to use the system module.
if file_is_nonempty "$HOME/.bashrc" # Provided by the filesystem module
then
log "$HOME/.bashrc is nonempty! " # log() is provided by logging module
else
log "$HOME/.bashrc is empty! "
fi
@wayneeseguin
Copy link
Author

Notice how this is cleaner than the original?

Now play by doing things like commenting out the argument to file_is_nonempty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment