diff --git a/2022/copy.sh b/2022/copy.sh new file mode 100755 index 0000000..dc20c29 --- /dev/null +++ b/2022/copy.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -euo pipefail + +if [[ "$#" != "1" ]]; then + echo " Usage: ./copy.sh " + echo "Example: ./copy.sh 13" + exit 1 +fi + +from="day${1}-part1" +to="day${1}-part2" +cp -r "$from" "$to" +sed -i -e "s/$from/$to/g" "$to/Cargo.toml"