From bcc228088eafa02a01dad76d39ed9f1a0d8787c2 Mon Sep 17 00:00:00 2001 From: neingeist Date: Fri, 11 Oct 2024 16:35:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20use=20bash=20for=20scripts=20wit?= =?UTF-8?q?h=20bashisms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apt-dater-history-prune | 2 +- dir-empty | 2 +- randint | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apt-dater-history-prune b/apt-dater-history-prune index e1013df..fb11bfc 100755 --- a/apt-dater-history-prune +++ b/apt-dater-history-prune @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Prune old apt-dater history MTIME=+365 diff --git a/dir-empty b/dir-empty index b57cf5b..fb96649 100755 --- a/dir-empty +++ b/dir-empty @@ -2,7 +2,7 @@ # Check that all of the given directories are empty for d in "$@"; do - if [[ -n "$(ls -1 "$d")" ]]; then + if [ -n "$(ls -1 "$d")" ]; then exit 1 fi done diff --git a/randint b/randint index 7eba0f2..ab95870 100755 --- a/randint +++ b/randint @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Give a random integer between 1 and $1 inclusive min=1