Skip to content

Commit 2dec90c

Browse files
Move some code around to make a clearer separation between checking
the environment and actually building code.
1 parent 667f7e5 commit 2dec90c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

experiments/list_unsupported.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,6 @@ if [ "$1" = '--help' ]; then
2727
exit 3
2828
fi
2929

30-
echo >&2 "Project to build: $1"
31-
path="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
32-
include_path=""
33-
file_name=$(basename "$1")
34-
35-
for foldername in $(find ${path} -type d -name "*" | LC_ALL=posix sort ); do
36-
count=`ls -1 ${foldername}/*.ads 2>/dev/null | wc -l`
37-
if [ $count != 0 ]
38-
then
39-
include_path="${include_path} -I ${foldername}"
40-
fi
41-
done
42-
43-
echo "$1: Unsupported features\n" > "$file_name".txt
44-
4530
# gnat on the path?
4631
if ! command -v gnat > /dev/null; then
4732
echo >&2 "Gnat not on PATH!"
@@ -111,6 +96,21 @@ echo >&2 "...environment is OK."
11196

11297
# Finally start work
11398

99+
echo >&2 "Project to build: $1"
100+
path="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
101+
include_path=""
102+
file_name=$(basename "$1")
103+
104+
for foldername in $(find ${path} -type d -name "*" | LC_ALL=posix sort ); do
105+
count=`ls -1 ${foldername}/*.ads 2>/dev/null | wc -l`
106+
if [ $count != 0 ]
107+
then
108+
include_path="${include_path} -I ${foldername}"
109+
fi
110+
done
111+
112+
echo "$1: Unsupported features\n" > "$file_name".txt
113+
114114
# Enumerate all the sub directories of ADA_INCLUDE_PATH
115115
for include_folder in `echo "$ADA_INCLUDE_PATH" | tr ':' ' '` ; do
116116
echo "Expanding $include_folder..."

0 commit comments

Comments
 (0)