From b1d396babd48eae7da4aeb9d2395304f8f8d075a Mon Sep 17 00:00:00 2001 From: druckdev Date: Wed, 14 Jul 2021 13:48:21 +0200 Subject: [PATCH] *: Use `/usr/bin/env` in shebangs for bash & zsh To increase the portability (OSX for example has zsh under `/bin/zsh`). --- .config/polybar/launch.sh | 2 +- .config/polybar/scripts/battery.sh | 2 +- .config/polybar/scripts/bluetooth.sh | 2 +- .config/polybar/scripts/calendar.sh | 2 +- .config/polybar/scripts/pub_ipv4.sh | 2 +- .config/rofi/powermenu.sh | 2 +- .config/xsecurelock/transfer-sleep-lock.sh | 2 +- .config/zsh/autoload/clang-format | 2 +- .config/zsh/autoload/gbranch | 2 +- .config/zsh/autoload/git-submodule-rm | 2 +- .config/zsh/autoload/glog | 2 +- .config/zsh/autoload/gstash | 2 +- .config/zsh/autoload/ls-show-hidden | 2 +- .local/bin/filterHistory | 2 +- .local/bin/monitor-setup | 2 +- .local/bin/raw2preview | 2 +- .local/bin/wifi-mute | 2 +- meta/git/hooks/commit-msg | 2 +- meta/submodules | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh index 927db3f..8880115 100755 --- a/.config/polybar/launch.sh +++ b/.config/polybar/launch.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash XDG_CONF="${XDG_CONFIG_HOME:-$HOME/.config}" BASE_DIR="$XDG_CONF/polybar" diff --git a/.config/polybar/scripts/battery.sh b/.config/polybar/scripts/battery.sh index fe31803..3206227 100755 --- a/.config/polybar/scripts/battery.sh +++ b/.config/polybar/scripts/battery.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## config diff --git a/.config/polybar/scripts/bluetooth.sh b/.config/polybar/scripts/bluetooth.sh index b47ee59..eed63f8 100755 --- a/.config/polybar/scripts/bluetooth.sh +++ b/.config/polybar/scripts/bluetooth.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # See https://github.com/polybar/polybar-scripts/pull/237 bluetooth_print() { diff --git a/.config/polybar/scripts/calendar.sh b/.config/polybar/scripts/calendar.sh index 1f99a9f..fa5384c 100755 --- a/.config/polybar/scripts/calendar.sh +++ b/.config/polybar/scripts/calendar.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # The separation and recursion is sadly necessary since reload is apparently # executed in a subshell and thus using an environment variable does not work diff --git a/.config/polybar/scripts/pub_ipv4.sh b/.config/polybar/scripts/pub_ipv4.sh index 05f6ccc..d6d6b54 100755 --- a/.config/polybar/scripts/pub_ipv4.sh +++ b/.config/polybar/scripts/pub_ipv4.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash echo $(curl -s https://ipinfo.io/ip) diff --git a/.config/rofi/powermenu.sh b/.config/rofi/powermenu.sh index 23def8b..10bdbe3 100755 --- a/.config/rofi/powermenu.sh +++ b/.config/rofi/powermenu.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Inspired by https://github.com/cramermarius/rofi-menus/blob/master/scripts/powermenu.sh # entries with associated commands diff --git a/.config/xsecurelock/transfer-sleep-lock.sh b/.config/xsecurelock/transfer-sleep-lock.sh index aa3b17a..d898000 100755 --- a/.config/xsecurelock/transfer-sleep-lock.sh +++ b/.config/xsecurelock/transfer-sleep-lock.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # !Modified! /usr/share/doc/xss-lock/transfer-sleep-lock-generic-delay.sh # Example locker script -- demonstrates how to use the --transfer-sleep-lock diff --git a/.config/zsh/autoload/clang-format b/.config/zsh/autoload/clang-format index 08daae3..3d75ef1 100755 --- a/.config/zsh/autoload/clang-format +++ b/.config/zsh/autoload/clang-format @@ -1,4 +1,4 @@ -#!/usr/bin/zsh +#!/usr/bin/env zsh ## Author: druckdev ## Created: 2019-11-28 ## diff --git a/.config/zsh/autoload/gbranch b/.config/zsh/autoload/gbranch index cfb8302..0acb6cd 100755 --- a/.config/zsh/autoload/gbranch +++ b/.config/zsh/autoload/gbranch @@ -1,4 +1,4 @@ -#!/usr/bin/zsh +#!/usr/bin/env zsh ## Author: druckdev ## Created: 2021-05-15 ## diff --git a/.config/zsh/autoload/git-submodule-rm b/.config/zsh/autoload/git-submodule-rm index bf804a3..5b191ac 100755 --- a/.config/zsh/autoload/git-submodule-rm +++ b/.config/zsh/autoload/git-submodule-rm @@ -1,4 +1,4 @@ -#!/usr/bin/zsh +#!/usr/bin/env zsh ## Author: druckdev ## Created: 2020-09-13 ## diff --git a/.config/zsh/autoload/glog b/.config/zsh/autoload/glog index fbd8d53..8d1c130 100755 --- a/.config/zsh/autoload/glog +++ b/.config/zsh/autoload/glog @@ -1,4 +1,4 @@ -#!/usr/bin/zsh +#!/usr/bin/env zsh ## Author: druckdev ## Created: 2020-08-28 ## diff --git a/.config/zsh/autoload/gstash b/.config/zsh/autoload/gstash index 4bcc938..87606f2 100755 --- a/.config/zsh/autoload/gstash +++ b/.config/zsh/autoload/gstash @@ -1,4 +1,4 @@ -#!/usr/bin/zsh +#!/usr/bin/env zsh ## Author: druckdev ## Created: 2021-05-14 ## diff --git a/.config/zsh/autoload/ls-show-hidden b/.config/zsh/autoload/ls-show-hidden index 17a861a..6e49137 100755 --- a/.config/zsh/autoload/ls-show-hidden +++ b/.config/zsh/autoload/ls-show-hidden @@ -1,4 +1,4 @@ -#!/usr/bin/zsh +#!/usr/bin/env zsh ## Author: druckdev ## Created: 2019-10-21 ## diff --git a/.local/bin/filterHistory b/.local/bin/filterHistory index 11d1b12..80e8359 100755 --- a/.local/bin/filterHistory +++ b/.local/bin/filterHistory @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## Author: druckdev ## Created: 2020-06-14 diff --git a/.local/bin/monitor-setup b/.local/bin/monitor-setup index ee68ee9..33ffcbf 100755 --- a/.local/bin/monitor-setup +++ b/.local/bin/monitor-setup @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ################################################################################ # diff --git a/.local/bin/raw2preview b/.local/bin/raw2preview index d0f292c..7f8d99f 100755 --- a/.local/bin/raw2preview +++ b/.local/bin/raw2preview @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash TAGS_TO_TRANSFER=( -Orientation diff --git a/.local/bin/wifi-mute b/.local/bin/wifi-mute index 5c8e96e..581cafa 100755 --- a/.local/bin/wifi-mute +++ b/.local/bin/wifi-mute @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## This runs as a crontab every 5minutes ('*/5 * * * * /usr/local/bin/wifi-mute') diff --git a/meta/git/hooks/commit-msg b/meta/git/hooks/commit-msg index b01a86e..58d627c 100755 --- a/meta/git/hooks/commit-msg +++ b/meta/git/hooks/commit-msg @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # A hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file that has the diff --git a/meta/submodules b/meta/submodules index ee41f1f..f5f6ef6 100755 --- a/meta/submodules +++ b/meta/submodules @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash [[ $# -eq 1 ]] || { echo "Specify what to do" >&2; exit 1; }