-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsimpleScript
executable file
·60 lines (50 loc) · 1.46 KB
/
simpleScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
dirs=( "CoreMQTT-Agent" "coreSNTP"
"FreeRTOS-Cellular-Interface" "device-defender-for-aws-iot-embedded-sdk"
"backoffAlgorithm" "device-shadow-for-aws-iot-embedded-sdk"
"coreHTTP" "fleet-provisioning-for-aws-iot-embedded-sdk"
"coreJSON" "jobs-for-aws-iot-embedded-sdk"
"coreMQTT" "ota-for-aws-iot-embedded-sdk"
"corePKCS11" "sigv4-for-aws-iot-embedded-sdk"
"FreeRTOS-Kernel" "FreeRTOS-Plus-TCP" "FreeRTOS"
)
bashPass="\033[32;1m"
bashInfo="\033[33;1m"
bashFail="\033[31;1m"
bashEnd="\033[0m"
#gcMy(){
# git clone [email protected]:Skptak/$1.git "$1"
#}
gcrMy(){
gcr [email protected]:Skptak/"$dir".git
}
clean(){
# Clone repos
#git clone [email protected]:Skptak/$dir.git
git clean -xfd
git checkout *
git status
}
makeRustWordList(){
files=$(fdfind -e c -e h);
touch .cSpellWords.txt;
sort -u .cSpellWords.txt -o .cSpellWords.txt;
spell-checker -w .cSpellWords.txt $files > .rustSpellWords.txt;
sed -r -i 's/(.*): //g' .rustSpellWords.txt ;
sort -u .rustSpellWords.txt -o .rustSpellWords.txt;
cat .cSpellWords.txt >> .rustSpellWords.txt;
sort -u .rustSpellWords.txt -o .rustSpellWords.txt;
cat .rustSpellWords.txt;
}
#dirs=("coreJSON")
for dir in ${dirs[@]}; do
cd $dir
if [[ "$(basename $(pwd))" != "$dir" ]]; then
echo "Not in the directory we should be"
exit 1;
fi
echo -e "$bashPass dir= $dir $bashEnd"
makeRustWordList
echo -e "\n"
cd ..
done