Skip to content

Commit 5f176ee

Browse files
committed
[ci skip] combining update_inlists and update_inlinsts_mac script into a single script
1 parent c4181ee commit 5f176ee

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

scripts/update_inlists

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22

33
mkdir backup_inlists
44
cp inlist* backup_inlists
5-
sed 's/log_center_density_limit/log_center_density_upper_limit/' -i inlist*
6-
sed 's/log_center_temp_limit/log_center_temp_upper_limit/' -i inlist*
7-
sed 's/center_entropy_limit/center_entropy_upper_limit/' -i inlist*
8-
sed 's/max_entropy_limit/max_entropy_upper_limit/' -i inlist*
9-
sed -E '/inlist[1-5]/s/([1-5])([_a-z]*) =/\2\(\1\) =/' -i inlist*
5+
6+
if [[ "$(uname)" == "Darwin" ]]; then
7+
# Macs require a different syntax for sed
8+
sed -i '' 's/log_center_density_limit/log_center_density_upper_limit/' inlist*
9+
sed -i '' 's/log_center_temp_limit/log_center_temp_upper_limit/' inlist*
10+
sed -i '' 's/center_entropy_limit/center_entropy_upper_limit/' inlist*
11+
sed -i '' 's/max_entropy_limit/max_entropy_upper_limit/' inlist*
12+
sed -E -i '' '/inlist[1-5]/s/([1-5])([_a-z]*) =/\2\(\1\) =/' inlist*
13+
else
14+
sed 's/log_center_density_limit/log_center_density_upper_limit/' -i inlist*
15+
sed 's/log_center_temp_limit/log_center_temp_upper_limit/' -i inlist*
16+
sed 's/center_entropy_limit/center_entropy_upper_limit/' -i inlist*
17+
sed 's/max_entropy_limit/max_entropy_upper_limit/' -i inlist*
18+
sed -E '/inlist[1-5]/s/([1-5])([_a-z]*) =/\2\(\1\) =/' -i inlist*
19+
fi

scripts/update_inlists_mac

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)