r3692 - jhalfs/trunk

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Thu Apr 4 13:07:25 PDT 2013


Author: pierre
Date: Thu Apr  4 13:07:25 2013
New Revision: 3692

Log:
Add some logic to makefile and jhalfs, so that when exiting the configuration
menu without saving, you have the choice of exiting jhalfs

Modified:
   jhalfs/trunk/Makefile
   jhalfs/trunk/jhalfs

Modified: jhalfs/trunk/Makefile
==============================================================================
--- jhalfs/trunk/Makefile	Wed Apr  3 13:38:15 2013	(r3691)
+++ jhalfs/trunk/Makefile	Thu Apr  4 13:07:25 2013	(r3692)
@@ -17,6 +17,7 @@
 	$(MAKE) -C $(CONFIG) ncurses conf mconf
 
 menuconfig: $(CONFIG)/mconf
+	- at cp -a configuration configuration.old
 	@$(CONFIG)/mconf $(CONFIG_CONFIG_IN)
 
 config: $(CONFIG)/conf

Modified: jhalfs/trunk/jhalfs
==============================================================================
--- jhalfs/trunk/jhalfs	Wed Apr  3 13:38:15 2013	(r3691)
+++ jhalfs/trunk/jhalfs	Thu Apr  4 13:07:25 2013	(r3692)
@@ -83,6 +83,19 @@
     ;;
 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 <configuration>..."



More information about the alfs-log mailing list