Don't pass 2 arguments to shebang
On most platforms (according to shellcheck), you can't pass two arguments in a shebang. I.e. on Debian you get: /usr/bin/env: ‘bash -e’: No such file or directory
This commit is contained in:
parent
70d6f90f08
commit
0f07198271
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash -e
|
#!/usr/bin/env bash
|
||||||
# Both standalone script and qutebrowser userscript that opens a rofi menu with
|
# Both standalone script and qutebrowser userscript that opens a rofi menu with
|
||||||
# all files from the download director and opens the selected file. It works
|
# all files from the download director and opens the selected file. It works
|
||||||
# both as a userscript and a standalone script that is called from outside of
|
# both as a userscript and a standalone script that is called from outside of
|
||||||
@ -18,6 +18,8 @@
|
|||||||
# Thorsten Wißmann, 2015 (thorsten` on freenode)
|
# Thorsten Wißmann, 2015 (thorsten` on freenode)
|
||||||
# Any feedback is welcome!
|
# Any feedback is welcome!
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# open a file from the download directory using rofi
|
# open a file from the download directory using rofi
|
||||||
DOWNLOAD_DIR=${DOWNLOAD_DIR:-$QUTE_DOWNLOAD_DIR}
|
DOWNLOAD_DIR=${DOWNLOAD_DIR:-$QUTE_DOWNLOAD_DIR}
|
||||||
DOWNLOAD_DIR=${DOWNLOAD_DIR:-$HOME/Downloads}
|
DOWNLOAD_DIR=${DOWNLOAD_DIR:-$HOME/Downloads}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash -e
|
#!/usr/bin/env bash
|
||||||
help() {
|
help() {
|
||||||
blink=$'\e[1;31m' reset=$'\e[0m'
|
blink=$'\e[1;31m' reset=$'\e[0m'
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
@ -39,6 +39,7 @@ Configuration:
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
shopt -s nocasematch # make regexp matching in bash case insensitive
|
shopt -s nocasematch # make regexp matching in bash case insensitive
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash -e
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Behavior:
|
# Behavior:
|
||||||
# Userscript for qutebrowser which views the current web page in mpv using
|
# Userscript for qutebrowser which views the current web page in mpv using
|
||||||
@ -24,6 +24,8 @@
|
|||||||
# Thorsten Wißmann, 2015 (thorsten` on freenode)
|
# Thorsten Wißmann, 2015 (thorsten` on freenode)
|
||||||
# Any feedback is welcome!
|
# Any feedback is welcome!
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ -z "$QUTE_FIFO" ] ; then
|
if [ -z "$QUTE_FIFO" ] ; then
|
||||||
cat 1>&2 <<EOF
|
cat 1>&2 <<EOF
|
||||||
Error: $0 can not be run as a standalone script.
|
Error: $0 can not be run as a standalone script.
|
||||||
|
Loading…
Reference in New Issue
Block a user