-if isgrmlcd ; then
- GRML_WARN_SKEL=${GRML_WARN_SKEL:-0}
-else
- GRML_WARN_SKEL=${GRML_WARN_SKEL:-1}
-fi
-
-if (( GRML_WARN_SKEL != 0 )) ; then
-
-function grml_warn_skel_main() {
- printf '
-Dear user,
-
-You updated grml'\''s zshrc which brings a major change.
-The configuration is kept only in one file, being the global zshrc.
-In the past, the configuration was split in two files, with the
-second file being the .zshrc file from /etc/skel.
-
-If you have a .zshrc file in your home directory that originally
-came from the skel directory, please remove it. This is also the case
-if you followed earlier instructions from the grml-zsh-refcard or
-from <http://grml.org/console/> on non-grml systems.
-
-Please see the current grml-zsh-refcard (available at
-<http://grml.org/zsh/>) for updated installation information. In short,
-you don'\''t want a .zshrc.global file. Install the global zshrc to
-~/.zshrc and be done.
-
-If you need changes to the configuration, use ~/.zshrc.pre and
-~/.zshrc.local.
-
-'
-}
-
-function grml_warn_skel_remove() {
- printf 'To remove this warning execute '\''grml_do_not_warn_skel'\''.\n\n'
-}
-
-function grml_do_not_warn_skel() {
- printf '# Do not warn about old skel dot-files anymore\n' >>! ~/.zshrc.pre
- printf 'GRML_WARN_SKEL=0\n' >>! ~/.zshrc.pre
-}
-
-# let's try to guess how the user uses us.
-if is-at-least 4.3.7 ; then
- # funcsourcetrace requires at least version 4.3.7 of zsh.
- GRML_SRC_FILE="${${funcsourcetrace[1]}%:*}"
-
- grml_warn_skel_main
- case ${GRML_SRC_FILE} in
- (${HOME}/.zshrc.global)
- grml_warn_skel_remove
- printf '\nIt looks like you copied the grml zshrc to '\''~/.zshrc.global'\''.\n'
- printf 'Nowadays you just copy the global zshrc to '\''~/.zshrc'\'' to use\n'
- printf 'it on a non-grml-system.\n'
- ;;
- (${HOME}/.zshrc)
- printf '\nIt looks like you copied the grml zshrc to '\''~/.zshrc'\''.\n'
- printf 'We'\''ll disable this warning automatically for later sessions.\n'
- grml_do_not_warn_skel
- ;;
- (*)
- grml_do_not_warn_skel
- ;;
- esac
-else
- grml_warn_skel_main
- grml_warn_skel_remove
-fi
-
-unfunction grml_warn_skel_remove grml_warn_skel_main
-
-fi # GRML_WARN_SKEL
-