Fix "bin/run -l" to work correctly on Windows
On Windows, the script did not run correctly because of the "return"s. Here, we use "exit" instead. Also, there were many files with the same name but with different extensions in the output. Now, we only print out the names using grep, awk and sort utilities. In addition, a description for bin/run is added to bin/README.md Change-Id: Ifb106c89199ebc5a9debf6caef80bd1edf143b20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138514 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
This commit is contained in:
parent
673bff36bc
commit
a6c50882fd
2 changed files with 21 additions and 4 deletions
|
@ -3,9 +3,26 @@
|
|||
Tools and scripts mostly not used during the build
|
||||
|
||||
This direction has a number of key pieces (?) that are used during the
|
||||
build, or are simply generally useful. One example is
|
||||
build, or are simply generally useful. One example is `bin/run`.
|
||||
|
||||
This utility can be used to run the executables in this folder:
|
||||
|
||||
workdir/LinkTarget/Executable
|
||||
|
||||
Format of the usage is:
|
||||
|
||||
./bin/run application [parameters]|--list|--help
|
||||
|
||||
Use --list (same as -list or -l) to get the list of executables
|
||||
Use --help (same as -help or -h) to get this help
|
||||
|
||||
Another example is:
|
||||
|
||||
bin/find-german-comments <directory>
|
||||
|
||||
which will try to detect and extract all the German comments in a
|
||||
given source code hierarchy `/` directory.
|
||||
|
||||
Please note that the associated issue [tdf#39468](https://bugs.documentfoundation.org/show_bug.cgi?id=39468) is now marked as
|
||||
RESOLVED/FIXED, so don't expect many German comments.
|
||||
|
||||
|
|
6
bin/run
6
bin/run
|
@ -26,7 +26,7 @@ print_usage()
|
|||
list_executables()
|
||||
{
|
||||
echo "Listing executables inside workdir/LinkTarget/Executable folder:"
|
||||
find workdir/LinkTarget/Executable -executable -printf "%P\n"
|
||||
find workdir/LinkTarget/Executable -executable -printf "%P\n" | grep -v batch | awk -F. {'print $1'} | sort -u
|
||||
}
|
||||
|
||||
print_executable_name()
|
||||
|
@ -52,9 +52,9 @@ setdefaults()
|
|||
|
||||
case "$1" in
|
||||
""|"-h"|"-help"|"--help")
|
||||
print_usage; return 1;;
|
||||
print_usage; exit 1;;
|
||||
"-l"|"-list"|"--list")
|
||||
list_executables; return 0;;
|
||||
list_executables; exit 0;;
|
||||
*) print_executable_name $1;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue