diff --git a/b9.cabal b/b9.cabal
--- a/b9.cabal
+++ b/b9.cabal
@@ -1,5 +1,5 @@
 name:                b9
-version:             0.5.17
+version:             0.5.18
 
 synopsis:            A tool and library for building virtual machine images.
 
diff --git a/src/lib/B9/ShellScript.hs b/src/lib/B9/ShellScript.hs
--- a/src/lib/B9/ShellScript.hs
+++ b/src/lib/B9/ShellScript.hs
@@ -2,6 +2,7 @@
 {-| Definition of 'Script' and functions to convert 'Script's to bash
     scripts. -}
 module B9.ShellScript ( writeSh
+                      , renderScript
                       , emptyScript
                       , CmdVerbosity (..)
                       , Cwd (..)
@@ -156,6 +157,9 @@
         i <- reader ctxIgnoreErrors
         v <- reader ctxVerbosity
         return [Cmd cmd args u c i v]
+
+renderScript :: Script -> String
+renderScript = toBash . toCmds
 
 toBash :: [Cmd] -> String
 toBash cmds = intercalate "\n\n" $ bashHeader ++ (cmdToBash <$> cmds)
