diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2017-11-06 17:50:04 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2017-11-06 17:50:04 +0100 |
| commit | 439c8b273b6203af49242baf18eb7c22b3c4a035 (patch) | |
| tree | 7962cb398c649f4f5fd156ec89449fe041e9fdfd /setup.py | |
| parent | ce2a2cf9f5b7eb035e326930dcdab5e3018b1d0c (diff) | |
| download | dotfiles-439c8b273b6203af49242baf18eb7c22b3c4a035.tar.gz dotfiles-439c8b273b6203af49242baf18eb7c22b3c4a035.zip | |
simplify offlineimap setup
use xdg_spec instead of silly variable expansion patch
Diffstat (limited to 'setup.py')
| -rwxr-xr-x | setup.py | 33 |
1 files changed, 1 insertions, 32 deletions
@@ -55,33 +55,6 @@ def dotfile_loc_helper(quiet): else: return e -def offlineimap_passwd(quiet): - """Write the environment file for the systemd unit""" - res = dotfile_loc_helper(quiet) - if res: - return res - env_file_path = "/etc/systemd/system/offlineimap@fischerling.env" - if not os.path.exists(env_file_path): - try: - subprocess.run(["get_dotfiles_location", ">", - env_file_path]) - except Exception as e: - if isinstance(e, PermissionError): - subprocess.run(["get_dotfiles_location", "|", "sudo", "tee", "-a", - env_file_path, ">", "/dev/null"]) - else: - return e - -def offlineimap_warn(quiet): - """Print a warning about my offlineimap setup""" - - if not quiet: - print("! WARNING !") - print("My offlineimap setup uses a patched version !") - print("The patch can be found at offlineimap/expandvars.patch.") - print("Only proceed if you know what you are doing") - if input("Want to continue ? (y/N) ") not in ["Y","y"]: - exit("Aborting.") # targets are a list of tuples<file name, link destination> and/or functions @@ -125,11 +98,7 @@ targets = { [("config/terminator/config", home_dir + "/.config/terminator/config")], "offlineimap": - [offlineimap_warn, - ("offlineimap/offlineimaprc", home_dir + "/.offlineimaprc"), - ("offlineimap/offlineimap@.service", - "/etc/systemd/system/offlineimap@" + user + ".service"), - offlineimap_passwd], + [("config/offlineimap", home_dir + "/.config/offlineimap")], "msmtp": [("msmtprc", home_dir + "/.msmtprc")], "FAU": |
