-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7dc8bdc
commit c0f8681
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
if echo "$LD_LIBRARY_PATH" | grep -q libgmp && echo "$LD_LIBRARY_PATH" | grep -q libmpc && echo "$LD_LIBRARY_PATH" | grep -q libmpfr; then | ||
echo "LD_LIBRARY_PATH contains MPFR library, GMP library and MPC library" | ||
elif ! echo "$LD_LIBRARY_PATH" | grep -q libgmp; then | ||
echo "LD_LIBRARY_PATH missing GMP library" | ||
elif ! echo "$LD_LIBRARY_PATH" | grep -q libmpc; then | ||
echo "LD_LIBRARY_PATH missing MPC library" | ||
elif ! echo "$LD_LIBRARY_PATH" | grep -q libmpfr; then | ||
echo "LD_LIBRARY_PATH missing MPFR library" | ||
fi | ||
|
||
check_version() { | ||
package=$1 | ||
version_command=$2 | ||
|
||
echo -n "Checking $package... " | ||
if $version_command &> /dev/null; then | ||
version=$($version_command | head -n 1) | ||
echo "Installed ($version)" | ||
else | ||
echo "Not installed" | ||
fi | ||
} | ||
|
||
# Check versions of packages | ||
check_version "CMake" "cmake --version" | ||
check_version "NASM" "nasm -v" | ||
check_version "Flex" "flex --version" | ||
check_version "Bison" "bison --version" |