From fea665eb34ffa60dca20b23f349e4ba5efafb33f Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Sat, 18 Jun 2016 10:33:49 -0500 Subject: [PATCH] Use `#!/bin/sh` for portability (#14) --- yadm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/yadm b/yadm index a6531dd..75d5782 100755 --- a/yadm +++ b/yadm @@ -1,5 +1,4 @@ -#!/usr/bin/env bash - +#!/bin/sh # yadm - Yet Another Dotfiles Manager # Copyright (C) 2015 Tim Byrne @@ -15,6 +14,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +#; execute script with bash (shebang line is /bin/sh for portability) +if [ -z "$BASH_VERSION" ]; then + [ "$YADM_TEST" != 1 ] && exec bash "$0" "$@" +fi + VERSION=1.04 YADM_WORK="$HOME"