-
Notifications
You must be signed in to change notification settings - Fork 0
/
MAC-OS
13 lines (12 loc) · 1.37 KB
/
MAC-OS
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
if command -v sw_vers >/dev/null 2>&1; then
sed -i '' "s|sed -i|sed -i ''|g" *.sh config/*.sh data/ready/*.sh data/ready/*/*.sh
sed -i '' "s|sed -i|sed -i ''|g" data-test Makefile agree
sed -i '' "s|\"\$(date +%s.%N)\"|\"\$(python -c 'import time; print(\"%.9f\" % time.time())')\"|g" data-test config/*.sh
# config functions
sed -i '' "s|find \"\$_current_build_folder\" -type f -name \"\*-pull-\*\" \| xargs du -ch --block-size=1M \| grep total\$ \| cut -f1|find \$_current_build_folder -type f -name \"\*-pull-\*\" -exec du -ch -k -m \{\} \+ \| grep total\$ \| cut -f1|" config/checkFileSizes.sh
sed -i '' "s|find \"\$_current_build_folder\" -type f -name \"\*-source-\*\" \| xargs du -ch --block-size=1M \| grep total\$ \| cut -f1|find \$_current_build_folder -type f -name \"\*-source-\*\" -exec du -ch -k -m \{\} \+ \| grep total\$ \| cut -f1|" config/checkFileSizes.sh
# main test file
sed -i '' "s|echo \"\${_COMMAND_TEST\^}\"|echo \"\${_COMMAND_TEST}\" \| awk '{print toupper(substr(\$0, 1, 1)) substr(\$0, 2)}'|g" data-test
sed -i '' "s|awk -v _test_file_list=\"\$(cat .temp-filesTested.txt)\" '{gsub(\"CHANGE_FILE_LIST\", _test_file_list)}1' README.md \>\> .outREADME.md|while read r\; do sed -i '' \"s\|CHANGE_FILE_LIST\| \$r \\\nCHANGE_FILE_LIST\|\" README.md\; done < .temp-filesTested.txt \; sed -i '' \"s\|CHANGE_FILE_LIST\|\|g\" README.md|" data-test
fi