Add utility script to quickly set up part two

This commit is contained in:
Tobias Marschner 2024-02-11 12:48:52 +01:00
parent 68fa7fa6f5
commit c737e0ed67

13
2022/copy.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
set -euo pipefail
if [[ "$#" != "1" ]]; then
echo " Usage: ./copy.sh <day>"
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"