9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-09 15:03:37 +01:00
qp2/scripts/module/create_executables_list.sh
Anthony Scemama f66ee4343a
Some checks reported errors
continuous-integration/drone/push Build was killed
Fixed minor bugs
2023-04-18 16:02:43 +02:00

29 lines
742 B
Bash
Executable File

#!/bin/bash
#
# Thu Mar 26 01:27:14 CET 2015
if [[ -z ${QP_ROOT} ]]
then
print "The QP_ROOT environment variable is not set."
print "Please reload the quantum_package.rc file."
exit -1
fi
cd ${QP_ROOT}/data
rm -f executables
if [[ "$(uname -s)" = "Darwin" ]] ; then
EXES=$(find -L ${QP_ROOT}/src -maxdepth 2 -depth -perm +111 -type f | grep -e "${QP_ROOT}/src/[^/]*/[^/]*$" |sort )
else
EXES=$(find -L ${QP_ROOT}/src -maxdepth 2 -depth -executable -type f | grep -e "${QP_ROOT}/src/[^/]*/[^/]*$" |sort )
fi
for EXE in $EXES
do
case "$(basename $EXE)" in
install) continue;;
uninstall) continue;;
*)
printf "%-30s %s\n" $(basename $EXE) $EXE | sed "s|${QP_ROOT}|\$QP_ROOT|g" >> executables ;;
esac
done