Skip to content

Commit da7d8c7

Browse files
committed
fix(ci): convert daily_wbb_R_processor.sh from CRLF to LF line endings
Bash on Linux can't parse CR after `in` keyword: scripts/daily_wbb_R_processor.sh: line 4: syntax error near unexpected token `$'in\r'' scripts/daily_wbb_R_processor.sh: line 4: ` case "${flag}" in Surfaced when the wnba-data parser ran (the wbb-data parser will hit the same once wbb-raw triggers it). The script was committed with Windows CRLF line endings during the original Phase 1-3 work; the daily processor failed before any R script ran. Stripped CR from every line via `sed -i 's/\r$//'`. No semantic changes.
1 parent df93178 commit da7d8c7

1 file changed

Lines changed: 30 additions & 30 deletions

File tree

scripts/daily_wbb_R_processor.sh

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
#!/bin/bash
2-
while getopts s:e:r: flag
3-
do
4-
case "${flag}" in
5-
s) START_YEAR=${OPTARG};;
6-
e) END_YEAR=${OPTARG};;
7-
r) RESCRAPE=${OPTARG};;
8-
esac
9-
done
10-
for i in $(seq "${START_YEAR}" "${END_YEAR}")
11-
do
12-
echo "$i"
13-
git pull >> /dev/null
14-
git config --local user.email "action@github.com"
15-
git config --local user.name "Github Action"
16-
Rscript R/espn_wbb_01_pbp_creation.R -s $i -e $i
17-
Rscript R/espn_wbb_02_team_box_creation.R -s $i -e $i
18-
Rscript R/espn_wbb_03_player_box_creation.R -s $i -e $i
19-
Rscript R/espn_wbb_04_rosters_creation.R -s $i -e $i
20-
Rscript R/espn_wbb_05_player_season_stats_creation.R -s $i -e $i
21-
Rscript R/espn_wbb_06_team_season_stats_creation.R -s $i -e $i
22-
Rscript R/espn_wbb_07_standings_creation.R -s $i -e $i
23-
Rscript R/espn_wbb_08_game_rosters_creation.R -s $i -e $i
24-
Rscript R/espn_wbb_09_officials_creation.R -s $i -e $i
25-
git pull >> /dev/null
26-
git add wbb/* >> /dev/null
27-
git pull >> /dev/null
28-
git commit -m "WBB Data update (Start: $i End: $i)" >> /dev/null || echo "No changes to commit"
29-
git pull --rebase >> /dev/null
30-
git push >> /dev/null
1+
#!/bin/bash
2+
while getopts s:e:r: flag
3+
do
4+
case "${flag}" in
5+
s) START_YEAR=${OPTARG};;
6+
e) END_YEAR=${OPTARG};;
7+
r) RESCRAPE=${OPTARG};;
8+
esac
9+
done
10+
for i in $(seq "${START_YEAR}" "${END_YEAR}")
11+
do
12+
echo "$i"
13+
git pull >> /dev/null
14+
git config --local user.email "action@github.com"
15+
git config --local user.name "Github Action"
16+
Rscript R/espn_wbb_01_pbp_creation.R -s $i -e $i
17+
Rscript R/espn_wbb_02_team_box_creation.R -s $i -e $i
18+
Rscript R/espn_wbb_03_player_box_creation.R -s $i -e $i
19+
Rscript R/espn_wbb_04_rosters_creation.R -s $i -e $i
20+
Rscript R/espn_wbb_05_player_season_stats_creation.R -s $i -e $i
21+
Rscript R/espn_wbb_06_team_season_stats_creation.R -s $i -e $i
22+
Rscript R/espn_wbb_07_standings_creation.R -s $i -e $i
23+
Rscript R/espn_wbb_08_game_rosters_creation.R -s $i -e $i
24+
Rscript R/espn_wbb_09_officials_creation.R -s $i -e $i
25+
git pull >> /dev/null
26+
git add wbb/* >> /dev/null
27+
git pull >> /dev/null
28+
git commit -m "WBB Data update (Start: $i End: $i)" >> /dev/null || echo "No changes to commit"
29+
git pull --rebase >> /dev/null
30+
git push >> /dev/null
3131
done

0 commit comments

Comments
 (0)