aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/offlineimap/config (renamed from offlineimap/offlineimaprc)2
-rw-r--r--config/offlineimap/offlineimap.py (renamed from offlineimap/offlineimap.py)0
-rw-r--r--config/offlineimap/offlineimap@.service (renamed from offlineimap/offlineimap@.service)0
-rw-r--r--offlineimap/expandvars.patch13
-rwxr-xr-xsetup.py33
5 files changed, 2 insertions, 46 deletions
diff --git a/offlineimap/offlineimaprc b/config/offlineimap/config
index f514afd..c54570f 100644
--- a/offlineimap/offlineimaprc
+++ b/config/offlineimap/config
@@ -3,7 +3,7 @@
[general]
accounts = FAUMail,MUHQ
maxsyncaccounts = 2
-pythonfile = $DOTFILES_LOCATION/offlineimap/offlineimap.py
+pythonfile = ~/.config/offlineimap/offlineimap.py
[Account FAUMail]
localrepository = LocalFAU
diff --git a/offlineimap/offlineimap.py b/config/offlineimap/offlineimap.py
index 8172d4d..8172d4d 100644
--- a/offlineimap/offlineimap.py
+++ b/config/offlineimap/offlineimap.py
diff --git a/offlineimap/offlineimap@.service b/config/offlineimap/offlineimap@.service
index 67c7e2b..67c7e2b 100644
--- a/offlineimap/offlineimap@.service
+++ b/config/offlineimap/offlineimap@.service
diff --git a/offlineimap/expandvars.patch b/offlineimap/expandvars.patch
deleted file mode 100644
index 3f36fae..0000000
--- a/offlineimap/expandvars.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/offlineimap/repository/IMAP.py b/offlineimap/repository/IMAP.py
-index e61f53d..8da0e19 100644
---- a/offlineimap/repository/IMAP.py
-+++ b/offlineimap/repository/IMAP.py
-@@ -378,7 +378,7 @@ class IMAPRepository(BaseRepository):
- # 3. read password from file specified in Repository 'remotepassfile'
- passfile = self.getconf('remotepassfile', None)
- if passfile != None:
-- fd = codecs.open(os.path.expanduser(passfile), 'r', 'UTF-8')
-+ fd = codecs.open(os.path.expandvars(os.path.expanduser(passfile)), 'r', 'UTF-8')
- password = fd.readline().strip()
- fd.close()
- return password.encode('UTF-8')
diff --git a/setup.py b/setup.py
index 31760ee..d917acf 100755
--- a/setup.py
+++ b/setup.py
@@ -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":