aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-18 17:10:14 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-18 17:10:14 +1200
commita46d6076edcddfd1032553d17d79db4005e6be2b (patch)
treeb150c6320c5348eeed1814581b9ec7472bb57aa1
parentSave wget HSTS cache in XDG_CACHE_HOME (diff)
downloaddotfiles-a46d6076edcddfd1032553d17d79db4005e6be2b.tar.gz
dotfiles-a46d6076edcddfd1032553d17d79db4005e6be2b.zip
Move wget config into XDG
-rw-r--r--Makefile7
-rw-r--r--wget/profile.d/wget.sh5
2 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index c9ab1d85..5c2ab6c8 100644
--- a/Makefile
+++ b/Makefile
@@ -666,9 +666,10 @@ install-vim-syntax:
install-vint:
cp -p -- vint/vintrc.yaml $(HOME)/.vintrc.yaml
-install-wget:
- mkdir -p -- $(XDG_CACHE_HOME)/wget
- cp -p -- wget/wgetrc $(HOME)/.wgetrc
+install-wget: install-sh
+ cp -p -- wget/profile.d/* $(HOME)/.profile.d
+ mkdir -p -- $(XDG_CACHE_HOME)/wget $(XDG_CONFIG_HOME)/wget
+ cp -p -- wget/wgetrc $(XDG_CONFIG_HOME)/wget/wgetrc
install-x: check-xinit
mkdir -p -- \
diff --git a/wget/profile.d/wget.sh b/wget/profile.d/wget.sh
new file mode 100644
index 00000000..884f19ed
--- /dev/null
+++ b/wget/profile.d/wget.sh
@@ -0,0 +1,5 @@
+# Set path to wgetrc file in XDG dirs. There's no mention of this environment
+# variable in the man page! I had to check the source.
+#
+WGETRC=${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc
+export WGETRC