Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
Veit Kannegieser
Posts: 5
Joined: 2019-03-23, 19:16 to

Unread post by Veit Kannegieser » 2021-11-27, 16:24

I would like to suggest changes to the that is contained in the Linux builds,
and rename it to the used application, like
- help function (-h|--help) is no longer dead code
- guesses executable from script name, also uses that for the help page

Code: Select all

---	2021-09-11 22:31:37.000000000 +0100
+++	2021-10-20 11:47:16.193817558 +0100
@@ -5,8 +5,8 @@
 # file, You can obtain one at
 cmdname=`basename "$0"`
 MOZ_DIST_BIN=`dirname "$0"`
+MOZ_DEFAULT_NAME="./`echo ${cmdname} | awk 'sub(/^run-/, "") sub(/.sh$/, "")'`'"
@@ -32,17 +32,17 @@
 echo ""
 echo "  Examples:"
 echo ""
-echo "  Run the mozilla-bin binary"
+echo "  Run the ${MOZ_DEFAULT_NAME} binary"
 echo ""
-echo "    ${cmdname} mozilla-bin"
+echo "    ${cmdname} ${MOZ_DEFAULT_NAME}"
 echo ""
-echo "  Debug the mozilla-bin binary in gdb"
+echo "  Debug the ${MOZ_DEFAULT_NAME} binary in gdb"
 echo ""
-echo "    ${cmdname} -g mozilla-bin -d gdb"
+echo "    ${cmdname} -g ${MOZ_DEFAULT_NAME} -d gdb"
 echo ""
-echo "  Run mozilla-bin under valgrind with arguments"
+echo "  Run ${MOZ_DEFAULT_NAME} under valgrind with arguments"
 echo ""
-echo "    ${cmdname} -g -d valgrind -a '--tool=memcheck --leak-check=full' mozilla-bin"
+echo "    ${cmdname} -g -d valgrind -a '--tool=memcheck --leak-check=full' ${MOZ_DEFAULT_NAME}"
 echo ""
 	return 0
@@ -172,6 +172,10 @@
 while [ $# -gt 0 ]
   case $1 in
+    -h | --help)
+      moz_usage
+      exit 0
+      ;;
     -g | --debug)
(8.86 KiB) Downloaded 5 times