Adapt shebangs

Convert all shebangs to /usr/bin/env bash, if bash is really required in
the script. Otherwise convert it to /bin/sh.

/bin/bash is not available on all systems, while /usr/bin/env bash and
/bin/sh are.
This commit is contained in:
Benedikt Heine 2018-05-23 13:33:43 +02:00 committed by Felix Buehler
parent 35d7d39126
commit 16aad7f4c5
12 changed files with 15 additions and 4 deletions

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
shopt -s autocd shopt -s autocd
shopt -s checkwinsize shopt -s checkwinsize

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh
case "$1" in case "$1" in
all) all)

View file

@ -1,4 +1,5 @@
#! /bin/bash #!/bin/sh
FOCUSED=$(xprop -root _NET_ACTIVE_WINDOW | awk -F' ' '{print $NF}') FOCUSED=$(xprop -root _NET_ACTIVE_WINDOW | awk -F' ' '{print $NF}')
if xprop -id ${FOCUSED} _NET_WM_STATE | grep -q _NET_WM_STATE_FULLSCREEN; then if xprop -id ${FOCUSED} _NET_WM_STATE | grep -q _NET_WM_STATE_FULLSCREEN; then
exit 1 exit 1

View file

@ -1,4 +1,4 @@
#!/usr/bin/bash #!/usr/bin/env bash
# shellcheck source=.lockvars # shellcheck source=.lockvars
# shellcheck disable=SC1091 # shellcheck disable=SC1091

View file

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
#alias definitions #alias definitions
alias chmox="chmod +x" alias chmox="chmod +x"
alias cd..="cd .." alias cd..="cd .."

View file

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
#correct some fast tipped cds #correct some fast tipped cds
function c { function c {
if [ $1 == "d.." ]; then if [ $1 == "d.." ]; then

View file

@ -1,2 +1,3 @@
#!/bin/sh #!/bin/sh
[ -r /etc/profile.d/cnf.sh ] && . /etc/profile.d/cnf.sh [ -r /etc/profile.d/cnf.sh ] && . /etc/profile.d/cnf.sh

View file

@ -1,3 +1,5 @@
#!/bin/sh
x() { x() {
for zipfile in $*; do for zipfile in $*; do
local extractor local extractor

View file

@ -1,3 +1,5 @@
#!/bin/sh
#LP_ENABLE_RUNTIME=1 #LP_ENABLE_RUNTIME=1
LP_ENABLE_TITLE=1 LP_ENABLE_TITLE=1
LP_ENABLE_SSH_COLORS=1 LP_ENABLE_SSH_COLORS=1

View file

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
for profile in ~/.profile.d/*.sh; do for profile in ~/.profile.d/*.sh; do
if [ -x "$profile" ]; then if [ -x "$profile" ]; then
source $profile source $profile

View file

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
function set_path(){ function set_path(){
if [[ -d "$1" ]]; then if [[ -d "$1" ]]; then
export PATH=$1:$PATH export PATH=$1:$PATH

View file

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
export EDITOR=vim export EDITOR=vim
export VISUAL=vim export VISUAL=vim
export BROWSER=firefox export BROWSER=firefox