Read standard XDG directories via systemd
This commit is contained in:
parent
ce648429fa
commit
4810683763
2 changed files with 5 additions and 5 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
export BORG_REPO="/media/backup/"
|
export BORG_REPO="/media/backup/"
|
||||||
export BORG_PASSCOMMAND="cat ${HOME}/.keys/borg-passphrase.txt"
|
export BORG_PASSCOMMAND="cat ${HOME}/.keys/borg-passphrase.txt"
|
||||||
|
|
||||||
TS_DIR="${HOME}/.local/state/backup"
|
TS_DIR="$(systemd-path user-state-private)"/backup
|
||||||
|
|
||||||
mkdir -p "${TS_DIR}"
|
mkdir -p "${TS_DIR}"
|
||||||
|
|
||||||
|
|
@ -11,12 +11,12 @@ backup () {
|
||||||
target=$1
|
target=$1
|
||||||
directory=$2
|
directory=$2
|
||||||
|
|
||||||
if "${HOME}/.local/bin/dirtree-changed" --directory "${directory}" --check-file "${TS_DIR}/${target}"
|
if "$(systemd-path user-binaries)"/dirtree-changed --directory "${directory}" --check-file "${TS_DIR}/${target}"
|
||||||
then
|
then
|
||||||
borg create --compression auto,lzma ::"${target}"-\{now\} "${directory}"
|
borg create --compression auto,lzma ::"${target}"-\{now\} "${directory}"
|
||||||
touch "${TS_DIR}/${target}"
|
touch "${TS_DIR}/${target}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
backup circuits "${HOME}/.config/circuits"
|
backup circuits "$(systemd-path user-configuration)"/circuits
|
||||||
backup documents "${HOME}/Documents"
|
backup documents "$(systemd-path user-documents)"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#! /usr/bin/sh
|
#! /usr/bin/sh
|
||||||
|
|
||||||
WATCHLIST=~/.local/share/package-alert/watchlist
|
WATCHLIST="$(systemd-path user-shared)"/package-alert/watchlist
|
||||||
|
|
||||||
agg_results=""
|
agg_results=""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue