Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Move Files Into Place For A Rust Test From Cago Watch

This is how I move files into place if I'm running tests that need to work with the filesystem and I don't want to setup a mock version.

Code

#!/bin/bash

cargo watch -s "bash -c 'cp /Users/alan/Desktop/prep.txt \
/Users/alan/Desktop/sample/working.txt' && cargo run" \