crust
Version, currently master branch1 version
- master branchlatestMar 14, 2018
github.com/Virtual-Machine/crust
Shell helper functions for crystal
2 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
crust:
github: Virtual-Machine/crust
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.24.1- License
- MIT
- Author
- Virtual-Machine
- Target
crustfrom src/crust.cr
Dependencies
This version declares no dependencies.
README
crust
Helper functions to write build/shell scripts with Crystal
Examples
require "crust"
###
# Exposed Helpers Examples
###
# Print all files or directories recursively in /directory/
recurse :all, "./directory/" do |item|
puts item
end
# Print all directories recursively in /directory/
recurse :dir, "./directory/" do |item|
puts item
end
# Print all files recursively in /directory/
recurse :file, "./directory/" do |item|
puts item
end
# Print all files recursively in /directory/ with either .cr, .rb or .yml extension
recurse_files "./directory/", ["cr", "rb", "yml"] do |item|
puts item
end
# Execute all files in /directory/ with .rb extension
get_files "./directory/", ["rb"] do |item|
system "ruby #{item}"
end
# Read all files in /directory/ with .yml extension
get_files "./directory/", ["yml"] do |item|
system "cat #{item}"
end
# Ensure bin directory exists
ensure_bin_dir
# Ensure bin directory is empty
clean_bin_dir
# Build release binary as bin/specimen using src/specimen.cr
release_build("src/specimen.cr", "bin/specimen")
# Run binary with given input to file
run_binary("bin/demo", "input_to_file", "log_file")
Also see demo.cr
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Mar 14, 2018
- Crystal
0.24.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/Virtual-Machine/crust
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 1