Commit f600d99 1 parent 2ce81d1 commit f600d99 Copy full SHA for f600d99
File tree 2 files changed +12
-10
lines changed
2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -41,3 +41,9 @@ Cargo.lock
41
41
42
42
main1
43
43
main2
44
+
45
+ * /* /input1
46
+ * /* /input2
47
+ * /* /assignment
48
+ * /* /output1
49
+ * /* /output2
Original file line number Diff line number Diff line change @@ -7,17 +7,18 @@ DAY="$2"
7
7
mkdir -p " $YEAR /$DAY "
8
8
cd " $YEAR /$DAY " || exit
9
9
10
- touch output1 output2
11
-
12
10
if [ ! -f main1.go ]; then cp ../../go.template main1.go; fi
13
11
if [ ! -f main2.go ]; then cp ../../go.template main2.go; fi
14
12
15
13
if [ ! -f Makefile ]; then cat > Makefile << EOF
14
+ download:
15
+ http "https://adventofcode.com/$YEAR /day/$DAY /input" "Cookie:session=$AOC_SESSION ;" >input
16
+
16
17
main1:
17
- go build -o main1 main1.go common.go
18
+ go build -o main1 main1.go
18
19
19
20
main2:
20
- go build -o main2 main2.go common.go
21
+ go build -o main2 main2.go
21
22
22
23
.PHONY: run1 run2 clean
23
24
@@ -28,15 +29,10 @@ run2: main2
28
29
./main2 <input
29
30
30
31
clean:
31
- rm -f main1 main2
32
+ rm -f main1 main2 input
32
33
33
34
EOF
34
35
fi
35
36
36
37
# download input files
37
38
http " https://adventofcode.com/$YEAR /day/$DAY /input" " Cookie:session=$AOC_SESSION ;" > input
38
-
39
- # download assignment
40
- http " https://adventofcode.com/$YEAR /day/$DAY " " Cookie:session=$AOC_SESSION ;" | pup ' article.day-desc' > tmp.html
41
- lynx -dump tmp.html -width 80 > assignment
42
- rm -f tmp.html
You can’t perform that action at this time.
0 commit comments