projects
/
grml-live.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d188c0
)
check for existence of /etc/grml and /live
author
Evgeni Golov
<evgeni@debian.org>
Wed, 25 Apr 2012 13:30:33 +0000
(15:30 +0200)
committer
Evgeni Golov
<evgeni@debian.org>
Wed, 25 Apr 2012 13:30:33 +0000
(15:30 +0200)
produces a nicer error when called outside a Grml session
remaster/grml-live-remaster
patch
|
blob
|
history
diff --git
a/remaster/grml-live-remaster
b/remaster/grml-live-remaster
index
456dbab
..
39cc81b
100755
(executable)
--- a/
remaster/grml-live-remaster
+++ b/
remaster/grml-live-remaster
@@
-24,6
+24,11
@@
set -e # exit on any error
VERSION='0.0.2'
GRML_LIVE_EDITOR=${VISUAL:-${EDITOR:-vi}}
+if [ ! -d /etc/grml -o ! -d /live ]; then
+ echo "Error: $0 has to be run from a Grml live session. Exiting."
+ exit 1
+fi
+
# source core functions {{{
. /etc/grml/lsb-functions
. /etc/grml/script-functions