forked from brandon-rhodes/python-sgp4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscore.sh
More file actions
executable file
·29 lines (24 loc) · 714 Bytes
/
score.sh
File metadata and controls
executable file
·29 lines (24 loc) · 714 Bytes
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
#!/bin/bash
set -e
cd $(dirname "$0")
# Determine how much of the original C++ we have retained.
CPP=../AIAA-2006-6753/cpp/sgp4unit.cpp
if ! [ -f "$CPP" ]
then
echo
echo "Error: cannot find path $CPP"
echo
echo "Please unzip AIAA-2006-6753.zip in the parent directory to this one"
echo
exit 2
fi
echo
echo "The number of lines of C++ that have disappeared is:"
diff -b -U 9999 "$CPP" sgp4/propagation.py | grep '^-' | wc -l
echo
echo "The number of Python lines that have been added is:"
diff -b -U 9999 "$CPP" sgp4/propagation.py | grep '^\+' | wc -l
echo
echo "The number of C++ lines that are still preserved is:"
diff -b -U 9999 "$CPP" sgp4/propagation.py | grep '^ ' | wc -l
echo