From f5a344fc675bdd21b5c8dc2f17841046c3e5bc27 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 14 Jun 2017 06:28:43 +0200 Subject: only enforce terminal when -s not given --- makekernel.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/makekernel.in b/makekernel.in index 4176aae..c165b47 100644 --- a/makekernel.in +++ b/makekernel.in @@ -45,13 +45,6 @@ then exit 1 fi -if ! stty &> /dev/null -then - >&2 echo 'ERROR: Must be called from a terminal! Closing.' - >&2 echo 'Did you forget "-t" for ssh?' - exit 1 -fi - eval set -- "$( getopt -o ac:ns \ --long allowDownload \ @@ -136,6 +129,13 @@ then exit 0 fi +if ! stty &> /dev/null +then + >&2 echo 'ERROR: Must be called from a terminal! Closing.' + >&2 echo 'Did you forget "-t" for ssh?' + exit 1 +fi + [ -z "${curVer}" ] && curVer="$("$0" -s)" mainVer="$( echo "${curVer}" | \ -- cgit v1.2.3-54-g00ecf