summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-14 06:28:43 +0200
committerErich Eckner <git@eckner.net>2017-06-14 06:28:43 +0200
commitf5a344fc675bdd21b5c8dc2f17841046c3e5bc27 (patch)
treefad8627c207d3f077952ffe7b5e1418900b0e313
parentc572577f08af6203137c19ad805f058c06ad2a6c (diff)
downloadmakekernel-f5a344fc675bdd21b5c8dc2f17841046c3e5bc27.tar.xz
only enforce terminal when -s not given
-rw-r--r--makekernel.in14
1 files 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}" | \