commit 2595d3cf1b3b9f7115d722a1106f3f4087f67694 parent d01a5189cf87ac90fd567209315b9efbf7dfc7fc Author: Ed van Bruggen <ed@edryd.org> Date: Tue, 17 Jun 2025 18:54:29 -0400 uz: Exit on first error Diffstat:
| M | bin/uz | | | 6 | ++++-- |
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/bin/uz b/bin/uz @@ -1,10 +1,12 @@ -#!/usr/bin/env bash +#!/bin/sh # uz: safe unzip # # unzip file into its own directory -if [[ $# != 1 ]]; then +set -e # exit on error + +if [ $# -ne 1 ]; then echo "usage: uz ZIPFILE" exit 1 fi