dot

packages and services management
Log | Files | Refs | README

commit 17a3b2909d1efa2bfce267f72d9abef65a0ef3fc
parent c1a8d91523c1926a62cc796482adf6f8ceed8743
Author: Josuah Demangeon <mail@josuah.net>
Date:   Mon,  8 Jan 2018 02:03:09 +0100

var -> .cache

Diffstat:
Mbin/daemon | 4++--
Mbin/dvtm-status | 2+-
Mbin/etc | 16++++++++--------
Mbin/irc | 4++--
Mbin/monit | 2+-
Mbin/xdg-open | 14+++++++-------
Mdaemon/ii | 2+-
Mdaemon/monitor | 4++--
Mdaemon/opentracker | 2+-
Mdaemon/ratox | 2+-
Mdot/mpoprc | 2+-
Mdot/msmtprc | 2+-
Mdot/profile | 6+++---
Mpack/tinc/build | 4+++-
Dpack/tinyssh/build | 4----
Dpack/tinyssh/git | 1-
16 files changed, 34 insertions(+), 37 deletions(-)

diff --git a/bin/daemon b/bin/daemon @@ -1,6 +1,6 @@ #!/bin/sh -mkdir -p "$HOME/var/log" +mkdir -p "$HOME/.cache/log" cmd=$1 [ $# -gt 1 ] && shift @@ -15,7 +15,7 @@ case $cmd in s=$1 shift [ -f "$HOME/etc/daemon/$s" ] || exec printf '%s: no script found\n' "$s" - sh "$HOME/etc/daemon/$s" "$@" >> "$HOME/var/log/$s" 2>&1 + sh "$HOME/etc/daemon/$s" "$@" >> "$HOME/.cache/log/$s" 2>&1 printf '%-14s: %s\n' "$s" "$(pgrep -x "$s" | tr '\n' ' ')" ;; (stop) diff --git a/bin/dvtm-status b/bin/dvtm-status @@ -1,6 +1,6 @@ #!/bin/sh -FIFO="$HOME/var/run/dvtm-status.$$" +FIFO="$HOME/.cache/run/dvtm-status.$$" [ -p "$FIFO" ] || mkfifo -m 600 "$FIFO" || exit 1 diff --git a/bin/etc b/bin/etc @@ -14,14 +14,14 @@ case $1 in (mkdir) mkdir -p "$HOME/git" mkdir -p "$HOME/tmp" - mkdir -p "$HOME/var/irc" - mkdir -p "$HOME/var/log" - mkdir -p "$HOME/var/mail/INBOX/cur" - mkdir -p "$HOME/var/mail/INBOX/new" - mkdir -p "$HOME/var/mail/INBOX/tmp" - mkdir -p "$HOME/var/qemu" - mkdir -p "$HOME/var/run" - mkdir -p "$HOME/var/tox" + mkdir -p "$HOME/.cache/irc" + mkdir -p "$HOME/.cache/log" + mkdir -p "$HOME/.cache/mail/INBOX/cur" + mkdir -p "$HOME/.cache/mail/INBOX/new" + mkdir -p "$HOME/.cache/mail/INBOX/tmp" + mkdir -p "$HOME/.cache/qemu" + mkdir -p "$HOME/.cache/run" + mkdir -p "$HOME/.cache/tox" ;; (srv) git clone josuah@josuah.net:srv/git/srv.git "$HOME/srv" diff --git a/bin/irc b/bin/irc @@ -1,8 +1,8 @@ #!/bin/sh # Simple tiny ii client using eel(1) for formatting and iomenu(1) for selection. -IRCPATH=$HOME/var/irc -INPUT=$HOME/.cache/ii-client +IRCPATH=$HOME/.cache/irc +INPUT=$HOME/.cache/irc/input [ $# -eq 0 ] && exec "$0" "$(find "$IRCPATH" -type d | iomenu)" clear diff --git a/bin/monit b/bin/monit @@ -8,7 +8,7 @@ # 3. free memory 7. total free storage # 4. cpu usage -DATA=$HOME/var/monit +DATA=$HOME/.cache/monit awk_record='# -v mem -v bi -v bo BEGIN { diff --git a/bin/xdg-open b/bin/xdg-open @@ -60,7 +60,7 @@ EOF case $scheme in (9p) - dir=$HOME/var/9p/$address + dir=$HOME/.cache/9p/$address mkdir -p "$dir" exec doas 9pfs "$address" "$dir" ;; @@ -90,9 +90,9 @@ case $scheme in esac case $path in (*.torrent) - mkdir -p "$HOME/var/torrent" - curl -Lo "$HOME/var/torrent/${path##*/}" "$1" - exec "$0" "$HOME/var/torrent/${path##*/}" + mkdir -p "$HOME/.cache/torrent" + curl -Lo "$HOME/.cache/torrent/${path##*/}" "$1" + exec "$0" "$HOME/.cache/torrent/${path##*/}" ;; (*.jpg|*.JPG|*.jpeg|*.JPEG|*.png|*.PNG|*.gif) mkdir -p "$HOME/lib/http/image/$host/" @@ -127,9 +127,9 @@ case $scheme in ;; (irc) [ "$port" = . ] && port=6667 - mkdir -p "$HOME/var/irc/$host" "$HOME/var/log/ii/" - exec ii -s "$host" -i "$HOME/var/irc" -p "$port" -k PASS -f "$NAME" \ - > "$HOME/var/irc/$host/log" 2> "$HOME/var/log/ii/$host" & + mkdir -p "$HOME/.cache/irc/$host" "$HOME/.cache/log/ii/" + exec ii -s "$host" -i "$HOME/.cache/irc" -p "$port" -k PASS -f "$NAME" \ + > "$HOME/.cache/irc/$host/log" 2> "$HOME/.cache/log/ii/$host" & ;; (news) exec retawq "$1" diff --git a/daemon/ii b/daemon/ii @@ -2,4 +2,4 @@ p=${2:-6667} -exec ii -s "$1" -i "$HOME/var/irc" -p "$p" -n "$NICK" -k PASS -f "$NAME" & +exec ii -s "$1" -i "$HOME/.cache/irc" -p "$p" -n "$NICK" -k PASS -f "$NAME" & diff --git a/daemon/monitor b/daemon/monitor @@ -1,4 +1,4 @@ #!/bin/sh -mkdir -p "$HOME/var/stat/data" -vmstat "${1:-15}" | monitor > "$HOME/var/stat/data" & +mkdir -p "$HOME/.cache/stat/data" +vmstat "${1:-15}" | monitor > "$HOME/.cache/stat/data" & diff --git a/daemon/opentracker b/daemon/opentracker @@ -1,3 +1,3 @@ #!/bin/sh -exec opentracker -d "$SYSROOT/var/torrent" & +exec opentracker -d "$SYSROOT/.cache/torrent" & diff --git a/daemon/ratox b/daemon/ratox @@ -1,5 +1,5 @@ #!/bin/sh -cd "$HOME/var/ratox" +cd "$HOME/.cache/ratox" exec ratox & diff --git a/dot/mpoprc b/dot/mpoprc @@ -9,7 +9,7 @@ host mail.gandi.net user mail@josuah.net auth user passwordeval "enchive -a$((3600*12)) extract /mnt/key/vault/mpop /dev/stdout" -delivery maildir ~/var/mail/INBOX +delivery maildir ~/.cache/mail/INBOX keep on account default : mail@josuah.net diff --git a/dot/msmtprc b/dot/msmtprc @@ -8,6 +8,6 @@ from mail@josuah.net user mail@josuah.net auth on passwordeval "enchive -a$((3600*12)) extract /mnt/key/vault/mpop /dev/stdout" -logfile ~/var/log/msmtp +logfile ~/.cache/log/msmtp account default : mail@josuah.net diff --git a/dot/profile b/dot/profile @@ -4,8 +4,8 @@ export NICK="josuah" export EMAIL="mail@josuah.net" export MAILTO="$EMAIL" -export MAIL="$HOME/var/mail/mbox" -export MAILDIR="$HOME/var/mail" +export MAIL="$HOME/.cache/mail/mbox" +export MAILDIR="$HOME/.cache/mail" export EDITOR="edit" VISUAL="edit" export PAGER="less" MANPAGER="less" @@ -30,7 +30,7 @@ export BLIH="josuah.demangeon@epitech.eu" export CVSROOT="anoncvs@anoncvs.fr.openbsd.org:/cvs" export PKG_PATH="https://ftp.fr.openbsd.org/pub/OpenBSD/" -export ABDUCO_SOCKET_DIR="$HOME/.cache" +export ABDUCO_SOCKET_DIR="$HOME/.cache/run" export ABDUCO_CMD="dvtm-status" export MBLAZE="$HOME/.config/mblaze" export LESS="-~R" diff --git a/pack/tinc/build b/pack/tinc/build @@ -1,6 +1,8 @@ #!/bin/sh -e -./configure --prefix="$OPT" --disable-lzo --sysconfdir="$HOME/.config" +./configure --prefix="$OPT" --disable-lzo \ + --sysconfdir="$HOME/.config" \ + --localstatedir="$HOEM/.cache" case $(uname) in (*BSD) gmake install ;; (*) make install ;; esac diff --git a/pack/tinyssh/build b/pack/tinyssh/build @@ -1,4 +0,0 @@ -#!/bin/sh -e - -make -make DESTDIR="$OPT" install diff --git a/pack/tinyssh/git b/pack/tinyssh/git @@ -1 +0,0 @@ -git://github.com/janmojzis/tinyssh