summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorHossein <hossein@libreoffice.org>2022-08-19 11:14:32 +0200
committerHossein <hossein@libreoffice.org>2022-08-19 12:21:16 +0200
commita6c50882fd3fd90a7eaca81b311640e86eced9fa (patch)
tree23730022c2303ed16fc1012e024551c3de732df6 /bin
parent673bff36bc310252dd4d95ca9e31a0f69ba4454d (diff)
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>
Diffstat (limited to 'bin')
-rw-r--r--bin/README.md19
-rwxr-xr-xbin/run6
2 files changed, 21 insertions, 4 deletions
diff --git a/bin/README.md b/bin/README.md
index b81d1f4d1cf3..88a9b73a49d1 100644
--- a/bin/README.md
+++ b/bin/README.md
@@ -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.
+
diff --git a/bin/run b/bin/run
index 5405bd34cd2a..660dfbe273a6 100755
--- a/bin/run
+++ b/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