aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rw-r--r--README.md3
-rwxr-xr-xbash/templates/build-aux/assert-shellcheck.sh5
-rwxr-xr-xbash/templates/build-aux/assert-todos.sh3
-rwxr-xr-xbash/templates/build-aux/ci/ci-build.sh3
-rwxr-xr-xbash/templates/build-aux/ci/git-post-receive.sh3
-rwxr-xr-xbash/templates/build-aux/ci/git-pre-push.sh.in3
-rwxr-xr-xbash/templates/build-aux/compile-readme.sh3
-rw-r--r--bash/templates/build-aux/git-notes-release.sh3
-rwxr-xr-xbash/templates/build-aux/texinfo-build-web-assets.sh3
-rwxr-xr-xbash/templates/build-aux/with-container.sh3
-rwxr-xr-xbash/templates/build-aux/workflow/TODOs.sh3
-rw-r--r--bash/templates/cronjob-with-email.sh3
-rwxr-xr-xbuild-aux/assert-nixfmt.sh3
-rwxr-xr-xbuild-aux/assert-shellcheck.sh3
-rwxr-xr-xbuild-aux/assert-todos.sh3
-rwxr-xr-xbuild-aux/ci/ci-build.sh3
-rwxr-xr-xbuild-aux/ci/git-post-receive.sh3
-rw-r--r--build-aux/ci/git-pre-push.sh.in3
-rwxr-xr-xcron/annex.sh3
-rwxr-xr-xcron/archive-box.sh3
-rwxr-xr-xcron/backup.sh3
-rwxr-xr-xcron/copy-box-backups.sh3
-rwxr-xr-xcron/mbox-archive.sh3
-rwxr-xr-xcron/mr-remotes-backup.sh3
-rwxr-xr-xcron/repo-update.sh3
-rwxr-xr-xcron/report-summary.sh3
-rwxr-xr-xscripts/c3
-rwxr-xr-xscripts/fim3
-rwxr-xr-xscripts/gc-mail.sh3
-rwxr-xr-xscripts/gc.sh3
-rwxr-xr-xscripts/hd.sh3
-rwxr-xr-xscripts/open3
-rwxr-xr-xscripts/post.sh3
-rwxr-xr-xscripts/record-my-screen.sh3
-rwxr-xr-xscripts/vlc3
-rwxr-xr-xscripts/yt3
-rwxr-xr-xxmonad/scripts/brightness.sh3
-rwxr-xr-xxmonad/scripts/dmenu-emoji.sh3
-rwxr-xr-xxmonad/scripts/dmenu-vlc.sh3
-rwxr-xr-xxmonad/scripts/single-monitor.sh3
-rwxr-xr-xxmonad/scripts/xmobar-notmuch.sh3
-rwxr-xr-xxmonad/scripts/zero-brightness.sh3
43 files changed, 89 insertions, 47 deletions
diff --git a/Makefile b/Makefile
index 5a420d37..11422d23 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
.PHONY: check
check:
- sh -eux build-aux/assert-nixfmt.sh
- sh -eux build-aux/assert-shellcheck.sh
- sh -eux build-aux/assert-todos.sh
+ sh build-aux/assert-nixfmt.sh
+ sh build-aux/assert-shellcheck.sh
+ sh build-aux/assert-todos.sh
.PHONY: clean
clean:
@@ -10,5 +10,5 @@ clean:
.PHONY: public
public:
- sh -eux scripts/generate-tasks-and-bugs.sh
+ sh scripts/generate-tasks-and-bugs.sh
pandoc -s --metadata title='dotfiles - EuAndreh' -c styles.css -o public/index.html README.md
diff --git a/README.md b/README.md
index 6117500f..07461216 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,8 @@ blue "File 'EuAndreh.tar.gpg' created!"
### `copy-public-key.sh`
```
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
FINGERPRINT='5BDAE9B8B2F6C6BCBB0D6CE581F90EC3CD356060'
FILE="$(mktemp)"
diff --git a/bash/templates/build-aux/assert-shellcheck.sh b/bash/templates/build-aux/assert-shellcheck.sh
index d07815b4..334a8750 100755
--- a/bash/templates/build-aux/assert-shellcheck.sh
+++ b/bash/templates/build-aux/assert-shellcheck.sh
@@ -1,5 +1,6 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
git ls-files -z | \
- xargs -0 awk 'FNR==1 && /^#!\/bin\/sh/ { print FILENAME }' | \
+ xargs -0 awk 'FNR==1 && /^#!\/bin\/sh$/ { print FILENAME }' | \
xargs shellcheck
diff --git a/bash/templates/build-aux/assert-todos.sh b/bash/templates/build-aux/assert-todos.sh
index ce6c95bf..91015fe3 100755
--- a/bash/templates/build-aux/assert-todos.sh
+++ b/bash/templates/build-aux/assert-todos.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
if git grep FIXME | grep -v '^TODOs.md' | grep -v '^build-aux/assert-todos.sh' | grep -v '^build-aux/docbook-xsl/'; then
echo "Found dangling FIXME markers on the project."
diff --git a/bash/templates/build-aux/ci/ci-build.sh b/bash/templates/build-aux/ci/ci-build.sh
index 62e0f223..93c9ee10 100755
--- a/bash/templates/build-aux/ci/ci-build.sh
+++ b/bash/templates/build-aux/ci/ci-build.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
PACKAGE="$1"
LOGS_DIR="$2"
diff --git a/bash/templates/build-aux/ci/git-post-receive.sh b/bash/templates/build-aux/ci/git-post-receive.sh
index c78f1aca..2f6e3c0b 100755
--- a/bash/templates/build-aux/ci/git-post-receive.sh
+++ b/bash/templates/build-aux/ci/git-post-receive.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
for n in $(seq 0 $((GIT_PUSH_OPTION_COUNT - 1))); do
opt="$(eval "echo \$GIT_PUSH_OPTION_$n")"
diff --git a/bash/templates/build-aux/ci/git-pre-push.sh.in b/bash/templates/build-aux/ci/git-pre-push.sh.in
index d102d60d..dbadd1c7 100755
--- a/bash/templates/build-aux/ci/git-pre-push.sh.in
+++ b/bash/templates/build-aux/ci/git-pre-push.sh.in
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
PACKAGE="$(basename "$PWD")"
__ENABLE_CI__ LOGS_DIR="/data/ci/$PACKAGE/logs"
diff --git a/bash/templates/build-aux/compile-readme.sh b/bash/templates/build-aux/compile-readme.sh
index 6a20811b..91f60655 100755
--- a/bash/templates/build-aux/compile-readme.sh
+++ b/bash/templates/build-aux/compile-readme.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
pandoc -s \
--metadata title="$1 - EuAndreh" \
diff --git a/bash/templates/build-aux/git-notes-release.sh b/bash/templates/build-aux/git-notes-release.sh
index 487f200c..4d55645d 100644
--- a/bash/templates/build-aux/git-notes-release.sh
+++ b/bash/templates/build-aux/git-notes-release.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
DIST_ARCHIVES="$1"
VERSION="$2"
diff --git a/bash/templates/build-aux/texinfo-build-web-assets.sh b/bash/templates/build-aux/texinfo-build-web-assets.sh
index 9980e573..241ebb8f 100755
--- a/bash/templates/build-aux/texinfo-build-web-assets.sh
+++ b/bash/templates/build-aux/texinfo-build-web-assets.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
PACKAGE="$1"
shift
diff --git a/bash/templates/build-aux/with-container.sh b/bash/templates/build-aux/with-container.sh
index cff282f8..5544d8e8 100755
--- a/bash/templates/build-aux/with-container.sh
+++ b/bash/templates/build-aux/with-container.sh
@@ -1,3 +1,4 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
guix time-machine -C guix/pinned-channels.scm -- environment --pure -C -m guix/manifest.scm -- sh -c "$@"
diff --git a/bash/templates/build-aux/workflow/TODOs.sh b/bash/templates/build-aux/workflow/TODOs.sh
index 58fbd3ca..4a9eb65d 100755
--- a/bash/templates/build-aux/workflow/TODOs.sh
+++ b/bash/templates/build-aux/workflow/TODOs.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
mkdir -p public
diff --git a/bash/templates/cronjob-with-email.sh b/bash/templates/cronjob-with-email.sh
index 9f6e0ac3..b486ce52 100644
--- a/bash/templates/cronjob-with-email.sh
+++ b/bash/templates/cronjob-with-email.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
LOG_FILE="$(mktemp)"
{
finish() {
diff --git a/build-aux/assert-nixfmt.sh b/build-aux/assert-nixfmt.sh
index 6e4d2c6f..19bd0a2a 100755
--- a/build-aux/assert-nixfmt.sh
+++ b/build-aux/assert-nixfmt.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
# shellcheck disable=2016
find . -type f -name '*.nix' -print0 | xargs -0 -I{} sh -c '
diff --git a/build-aux/assert-shellcheck.sh b/build-aux/assert-shellcheck.sh
index d07815b4..cf2eed8a 100755
--- a/build-aux/assert-shellcheck.sh
+++ b/build-aux/assert-shellcheck.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
git ls-files -z | \
xargs -0 awk 'FNR==1 && /^#!\/bin\/sh/ { print FILENAME }' | \
diff --git a/build-aux/assert-todos.sh b/build-aux/assert-todos.sh
index 2af84fe0..ea0ab972 100755
--- a/build-aux/assert-todos.sh
+++ b/build-aux/assert-todos.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
EXCLUDE='(bash/templates/|build-aux/assert-todos.sh|scripts/pastebin.sh|bash/util.sh|docbook-xsl.tar.gz)'
if git grep FIXME | grep -Ev "$EXCLUDE"; then
diff --git a/build-aux/ci/ci-build.sh b/build-aux/ci/ci-build.sh
index 62e0f223..93c9ee10 100755
--- a/build-aux/ci/ci-build.sh
+++ b/build-aux/ci/ci-build.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
PACKAGE="$1"
LOGS_DIR="$2"
diff --git a/build-aux/ci/git-post-receive.sh b/build-aux/ci/git-post-receive.sh
index c78f1aca..2f6e3c0b 100755
--- a/build-aux/ci/git-post-receive.sh
+++ b/build-aux/ci/git-post-receive.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
for n in $(seq 0 $((GIT_PUSH_OPTION_COUNT - 1))); do
opt="$(eval "echo \$GIT_PUSH_OPTION_$n")"
diff --git a/build-aux/ci/git-pre-push.sh.in b/build-aux/ci/git-pre-push.sh.in
index 37e777ca..16428d6e 100644
--- a/build-aux/ci/git-pre-push.sh.in
+++ b/build-aux/ci/git-pre-push.sh.in
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
PACKAGE="$(basename "$PWD")"
LOGS_DIR="/data/ci/$PACKAGE/logs"
diff --git a/cron/annex.sh b/cron/annex.sh
index 555653a1..f1ebb2c0 100755
--- a/cron/annex.sh
+++ b/cron/annex.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
# Required for properly running Git Annex, related issue:
# https://git-annex.branchable.com/bugs/assistant_crashes_in_TransferScanner/
diff --git a/cron/archive-box.sh b/cron/archive-box.sh
index f6d81502..6e66939e 100755
--- a/cron/archive-box.sh
+++ b/cron/archive-box.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
# FIXME
diff --git a/cron/backup.sh b/cron/backup.sh
index 59b3cd0d..f92bd5d0 100755
--- a/cron/backup.sh
+++ b/cron/backup.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
# shellcheck source=/dev/null
. "${HOME}/.ssh/environment" > /dev/null
diff --git a/cron/copy-box-backups.sh b/cron/copy-box-backups.sh
index 92eda65a..104337c0 100755
--- a/cron/copy-box-backups.sh
+++ b/cron/copy-box-backups.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
# shellcheck source=/dev/null
. "${HOME}/.ssh/environment" > /dev/null
diff --git a/cron/mbox-archive.sh b/cron/mbox-archive.sh
index a12281ec..37dcccc0 100755
--- a/cron/mbox-archive.sh
+++ b/cron/mbox-archive.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
# FIXME
diff --git a/cron/mr-remotes-backup.sh b/cron/mr-remotes-backup.sh
index 0e378642..c483f529 100755
--- a/cron/mr-remotes-backup.sh
+++ b/cron/mr-remotes-backup.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
# shellcheck source=/dev/null
. "${HOME}/.ssh/environment"
diff --git a/cron/repo-update.sh b/cron/repo-update.sh
index 65eb6db5..cae3eeb0 100755
--- a/cron/repo-update.sh
+++ b/cron/repo-update.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
# shellcheck source=/dev/null
. "${HOME}/.ssh/environment"
diff --git a/cron/report-summary.sh b/cron/report-summary.sh
index c21b1476..b69c0b3c 100755
--- a/cron/report-summary.sh
+++ b/cron/report-summary.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
F="/tmp/cron-dbg.summary.$(date -I).euandreh.log"
if grep ^1 "$F"; then
diff --git a/scripts/c b/scripts/c
index 1257674a..630eb63d 100755
--- a/scripts/c
+++ b/scripts/c
@@ -1,4 +1,5 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
if [ -n "${TMUX:-}" ]; then
tmux send-keys -R \; clear-history
diff --git a/scripts/fim b/scripts/fim
index ff8e00d1..6cd1d6e8 100755
--- a/scripts/fim
+++ b/scripts/fim
@@ -1,3 +1,4 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
play "$DOTFILES/bash/Positive.ogg" 2> /dev/null
diff --git a/scripts/gc-mail.sh b/scripts/gc-mail.sh
index e631850f..15b4cd7a 100755
--- a/scripts/gc-mail.sh
+++ b/scripts/gc-mail.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
# shellcheck source=/dev/null
. "$DOTFILES/bash/colors.sh"
diff --git a/scripts/gc.sh b/scripts/gc.sh
index e7834dfe..f42c883f 100755
--- a/scripts/gc.sh
+++ b/scripts/gc.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
# shellcheck source=/dev/null
. "$DOTFILES/bash/colors.sh"
diff --git a/scripts/hd.sh b/scripts/hd.sh
index e977aa3c..e9d64d1f 100755
--- a/scripts/hd.sh
+++ b/scripts/hd.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
annex.sh
diff --git a/scripts/open b/scripts/open
index 9383059d..dec5e60f 100755
--- a/scripts/open
+++ b/scripts/open
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
case "$1" in
*.ico|*.jpg|*.jpeg|*.png)
diff --git a/scripts/post.sh b/scripts/post.sh
index d8447345..a3007883 100755
--- a/scripts/post.sh
+++ b/scripts/post.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
# shellcheck source=/dev/null
. "$DOTFILES/bash/colors.sh"
diff --git a/scripts/record-my-screen.sh b/scripts/record-my-screen.sh
index 95094b67..00c5e537 100755
--- a/scripts/record-my-screen.sh
+++ b/scripts/record-my-screen.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
usage() {
red "Missing argument $1.\n"
diff --git a/scripts/vlc b/scripts/vlc
index 8570b53c..87fa2b2a 100755
--- a/scripts/vlc
+++ b/scripts/vlc
@@ -1,4 +1,5 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
NIX=/run/current-system/sw/bin/vlc
GUIX=/run/current-system/profile/bin/vlc
diff --git a/scripts/yt b/scripts/yt
index 2d8de8d2..7115d1b9 100755
--- a/scripts/yt
+++ b/scripts/yt
@@ -1,4 +1,5 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
export DEFAULT_PLAYLIST_END=15
export DEFAULT_INC_STEP=10
diff --git a/xmonad/scripts/brightness.sh b/xmonad/scripts/brightness.sh
index 29dc05ba..77dc9b3f 100755
--- a/xmonad/scripts/brightness.sh
+++ b/xmonad/scripts/brightness.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
BRIGHTNESS_DIFF="${1}"
diff --git a/xmonad/scripts/dmenu-emoji.sh b/xmonad/scripts/dmenu-emoji.sh
index fef78356..71ccde81 100755
--- a/xmonad/scripts/dmenu-emoji.sh
+++ b/xmonad/scripts/dmenu-emoji.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
# Derived from:
# https://github.com/porras/dmenu-emoji
diff --git a/xmonad/scripts/dmenu-vlc.sh b/xmonad/scripts/dmenu-vlc.sh
index c42e26fb..e60b56fd 100755
--- a/xmonad/scripts/dmenu-vlc.sh
+++ b/xmonad/scripts/dmenu-vlc.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
URL="$(xsel -bo)"
diff --git a/xmonad/scripts/single-monitor.sh b/xmonad/scripts/single-monitor.sh
index 83d0455e..ec0815a8 100755
--- a/xmonad/scripts/single-monitor.sh
+++ b/xmonad/scripts/single-monitor.sh
@@ -1,2 +1,3 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 640x1440 --rotate normal --output DP1 --off --output HDMI2 --off --output HDMI1 --off --output DP2 --off
diff --git a/xmonad/scripts/xmobar-notmuch.sh b/xmonad/scripts/xmobar-notmuch.sh
index f174a8e0..691d5701 100755
--- a/xmonad/scripts/xmobar-notmuch.sh
+++ b/xmonad/scripts/xmobar-notmuch.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eu
+#!/bin/sh
+set -eu
while true; do
printf "mail: %s/%s\n" "$(notmuch count 'tag:unread AND (NOT tag:ml OR thread:{tag:track})')" "$(notmuch count tag:inbox)"
diff --git a/xmonad/scripts/zero-brightness.sh b/xmonad/scripts/zero-brightness.sh
index a748724b..c487dd3c 100755
--- a/xmonad/scripts/zero-brightness.sh
+++ b/xmonad/scripts/zero-brightness.sh
@@ -1,4 +1,5 @@
-#!/bin/sh -eux
+#!/bin/sh
+set -eux
# base dir for backlight class
BASEDIR='/sys/class/backlight/'