From 8730fcec44db3d0c3423c3c6169248d0cec1970a Mon Sep 17 00:00:00 2001 From: Alberto Donato Date: Sun, 4 Feb 2024 17:31:28 +0100 Subject: [PATCH] ensure all scripts use bash -e --- bin/decrypt-p7m | 2 +- bin/git-alias | 2 +- bin/git-update-origin-from-upstream | 2 +- bin/list-kernels | 2 +- bin/pb | 2 +- bin/port-forward | 2 +- bin/term-colors | 2 +- bin/ws | 14 -------------- 8 files changed, 7 insertions(+), 21 deletions(-) delete mode 100755 bin/ws diff --git a/bin/decrypt-p7m b/bin/decrypt-p7m index 1dab069..fda8651 100755 --- a/bin/decrypt-p7m +++ b/bin/decrypt-p7m @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e file="$1" diff --git a/bin/git-alias b/bin/git-alias index 78061e1..1c8bede 100755 --- a/bin/git-alias +++ b/bin/git-alias @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # shellcheck disable=SC2039 # # Manage git aliases. diff --git a/bin/git-update-origin-from-upstream b/bin/git-update-origin-from-upstream index a186a2a..f640c06 100755 --- a/bin/git-update-origin-from-upstream +++ b/bin/git-update-origin-from-upstream @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # shellcheck disable=SC2039 # # Fetch remotes and and update a branch (master by default) from the upstream diff --git a/bin/list-kernels b/bin/list-kernels index 005242c..691c197 100755 --- a/bin/list-kernels +++ b/bin/list-kernels @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # # List installed kernel packages. diff --git a/bin/pb b/bin/pb index 52486a0..6978ef7 100755 --- a/bin/pb +++ b/bin/pb @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # # Pastebinit input and copies the resulting url to clipboard (if under tmux). # diff --git a/bin/port-forward b/bin/port-forward index 1eee57e..ed330f3 100755 --- a/bin/port-forward +++ b/bin/port-forward @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # # Forward ports to the specified host using ssh tunneling. diff --git a/bin/term-colors b/bin/term-colors index 9c6102b..a1f2e49 100755 --- a/bin/term-colors +++ b/bin/term-colors @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # shellcheck disable=SC1117 # # Print the 256 terminal colors. diff --git a/bin/ws b/bin/ws deleted file mode 100755 index ce1dda7..0000000 --- a/bin/ws +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# -# Serve the specified path (by default the current directory) via HTTP. -# -# Usage: ws [directory] [options...] - - -dir="$PWD" -if [ -d "$1" ]; then - dir="$1" - shift 1 -fi - -(cd "$dir" || exit 1; python3 -m http.server "$@")