From f42043cdce16fa2633d29853ce551e8086a56657 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 9 May 2020 21:25:38 +0300 Subject: [PATCH] kiss: Move shebang options to main() --- kiss | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kiss b/kiss index e6f0c00..a8c34a8 100755 --- a/kiss +++ b/kiss @@ -1,13 +1,9 @@ -#!/bin/sh -ef +#!/bin/sh # shellcheck source=/dev/null # # This is a simple package manager written in POSIX 'sh' for use # in KISS Linux (https://k1ss.org). # -# This script runs with '-ef' meaning: -# '-e': Abort on any non-zero exit code. -# '-f': Disable globbing globally. -# # [1] Warnings related to word splitting and globbing are disabled. # All word splitting in this script is *safe* and intentional. # @@ -1619,6 +1615,9 @@ args() { } main() { + # Globally disable globbing and enable exit-on-error. + set -ef + # Die here if the user has no set KISS_PATH. This is a rare occurance # as the environment variable should always be defined. [ "$KISS_PATH" ] || die "\$KISS_PATH needs to be set"