advent-of-code/2020/setup_day.sh

13 lines
261 B
Bash
Raw Normal View History

2020-12-01 07:16:56 +01:00
#!/bin/sh
today=$(date +%d)
mkdir "$today"
cd "$today"
cargo init --name "day$today"
echo 'Initialized cargo project'
# this assumes that your puzzle input is already in your clipboard
xsel -b > input
# add trailing newline if necessary
sed -i -e '$a\' input