Skip to content

Commit e580f69

Browse files
committed
shfmt create_files.sh and fix for macOS
1 parent 07702cc commit e580f69

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

create_files.sh

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22

33
DIR=$(dirname $(readlink -f $0))
44

5-
for y in `seq -w 2015 2024`; do
5+
for y in $(seq -w 2015 2024); do
66
mkdir $DIR/$y
77

8-
for i in `seq -w 1 25`; do
8+
for i in $(seq -w 1 25); do
99
mkdir $DIR/$y/day-$i
1010

1111
if [ -z "$(ls -A $DIR/$y/day-$i)" ]; then
1212
cp template.rb $DIR/$y/day-$i/day-$i-part-1.rb
1313

14-
if [ $i -ne '25' ]
15-
then
14+
if [ $i -ne '25' ]; then
1615
cp template.rb $DIR/$y/day-$i/day-$i-part-2.rb
1716
fi
18-
sed -i "s/\\$/${i}/g" $DIR/$y/day-$i/*.rb
17+
sed -i "" "s/\\$/${i}/g" $DIR/$y/day-$i/*.rb
1918

2019
touch $DIR/$y/day-$i/README.txt
2120
touch $DIR/$y/day-$i/day-$i-input.txt

0 commit comments

Comments
 (0)