From 07278936c8b858a6128e476e84f869a87d48d7b2 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Thu, 4 Apr 2013 20:09:42 +0000 Subject: [PATCH] Merge trunk r3692 --- Makefile | 1 + jhalfs | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/Makefile b/Makefile index d5ae127..2eb1b92 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ $(CONFIG)/mconf: $(MAKE) -C $(CONFIG) ncurses conf mconf menuconfig: $(CONFIG)/mconf + -@cp -a configuration configuration.old @$(CONFIG)/mconf $(CONFIG_CONFIG_IN) config: $(CONFIG)/conf diff --git a/jhalfs b/jhalfs index 924ba40..855b0e6 100755 --- a/jhalfs +++ b/jhalfs @@ -83,6 +83,19 @@ case $1 in ;; esac +# If the user has not saved his configuration file, let's ask +# if he or she really wants to run this stuff +if [ $(ls -l --time-style='+%Y%m%d%H%M%S' configuration.old | cut -d' ' -f 6) \ + -ge $(ls -l --time-style='+%Y%m%d%H%M%S' configuration | cut -d' ' -f 6) ] + then echo -n "Do you want to run jhalfs? yes/no (yes): " + read ANSWER + if [ x${ANSWER:0:1} = "xn" -o x${ANSWER:0:1} = "xN" ] ; then + echo "${nl_}Exiting gracefully.${nl_}" + exit + fi +fi + +# Change this to 0 to suppress almost all messages VERBOSITY=1 [[ $VERBOSITY > 0 ]] && echo -n "Loading config params from ..."