File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -59,28 +59,43 @@ def install():
59
59
else :
60
60
choice = raw_input ().lower ()
61
61
if choice in ("yes" , "ye" , "y" ):
62
+ shutil .rmtree (settings_dir )
62
63
break
63
64
elif choice in ("no" , "n" ):
64
65
return
65
66
else :
66
67
print ("Must answer yes or no. Overwrite directory %s?" % settings_dir )
67
68
68
- shutil .rmtree (settings_dir )
69
69
shutil .copyfile (emacs_backup , emacs_file )
70
70
shutil .copytree (settings_backup , settings_dir )
71
71
72
72
73
+ def helptext ():
74
+ print ("emacs-config.py for Python 2.7 and Python 3.x" )
75
+ print ("USAGE: python emacs-config.py [install|update]" )
76
+ print ("Argument instructions:" )
77
+ print (" install: Installs the emacs configuration files into your Unix user's home folder" )
78
+ print (" update: Updates the archived configuration with files located in your Unix user's home folder" )
79
+
80
+
73
81
if __name__ == "__main__" :
74
82
for arg in sys .argv :
75
83
try :
76
84
if arg == "install" :
85
+ print ("Installing Andrew Clarry's emacs configuration" )
77
86
install ()
78
87
elif arg == "update" :
79
88
update ()
89
+ if arg in ("help" , "-h" , "--help" ):
90
+ helptext ()
80
91
except KeyboardInterrupt :
81
92
print ("Exiting" )
82
93
sys .exit (1 )
83
94
95
+ if len (sys .argv ) < 2 :
96
+ print ("Please specify what you want done\n " )
97
+ helptext ()
98
+
84
99
85
100
86
101
You can’t perform that action at this time.
0 commit comments