[packages/firefox60-esr] passthrough command line arguments in non-standard cases

atler atler at pld-linux.org
Mon Jul 8 23:51:57 CEST 2019


commit 9cf7a4a9a60c0a02610f24c2c1144c231cadc8be
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Jul 8 23:47:53 2019 +0200

    passthrough command line arguments in non-standard cases
    
    if more than one argument is passed or the only argument is option not URL

 firefox.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/firefox.sh b/firefox.sh
index 9192ab5..9d33a7e 100644
--- a/firefox.sh
+++ b/firefox.sh
@@ -26,7 +26,7 @@ PWD=${PWD:-$(pwd)}
 
 if [ -z "$1" ]; then
 	exec $FIREFOX
-else
+elif [ $# -eq 1 ] && echo "$1" | grep -q -v '^-'; then
 	if [ -f "$PWD/$1" ]; then
 		URL="file://$PWD/$1"
 	else
@@ -37,4 +37,6 @@ else
 	else
 		exec $FIREFOX -new-window "$URL"
 	fi
+else
+	exec $FIREFOX "$@"
 fi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/firefox60-esr.git/commitdiff/9cf7a4a9a60c0a02610f24c2c1144c231cadc8be



More information about the pld-cvs-commit mailing list